New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use 1-dim vector as input rather than images #446
Comments
All blobs are 4D, but any number of those dimensions can be singletons. That is, a N x K x 1 x 1 blob is a collection of N K-length vectors. The Caffe library and wrappers let you form blobs in this way–the spatial dimensions are up to you! The probability output of our reference ImageNet model is in fact such a blob: for N inputs, the output blob is a N x 1000 x 1 x 1 blob of the 1000 class probabilities per input. The hdf5 data layer was designed with vector processing as a main use case. One could use Caffe as a fast GPU SGD for training logistic regression or SVMs on vectors this way in addition to deep models. |
Thank for your suggestion. @shelhamer . I have tried the HDF5 data layer, but failed because of the error network definition. I think it's would be nice to write down the experiment steps, other people can also know how to do vector data with Caffe.
import h5py 1912 1:-13.2268419266 2:-10.7498941422 3:-39.1328201294 4:-1.40995645523 5:7.65763092041 6:10.6338567734 7:1.62673580647 8:-26.3683280945 9:22.6957206726 10:-0.855510830879 11:-13.2951841354 12:-9.82209396362 13:-6.48870944977 14:18.402715683 15:0.833472371101
layers { It seems that this code cannot read the HDF5 data. It failed to open it. Another error is the network definition. How can I solve this problem? Thanks. I0524 19:36:21.213978 23688 train_net.cpp:26] Starting Optimization |
I also see @sergeyk wrote a hdf5 example. Can you give some code or examples? Thank you very much |
Make sure the source is pointing to the right path of the file. To be sure On Saturday, May 24, 2014, GeoMetrix notifications@github.com wrote:
Sergio |
The network error is just a downstream problem from the hdf5 data not Try an absolute path as Sergio suggested. @sergeyk is there any trick to h5 Le samedi 24 mai 2014, Sergio Guadarrama notifications@github.com a
|
Thanks. @sergeyk and @shelhamer . I replaced the hdf5 source as an absolute path. The output is the same. This code can show: hdf5_data_layer.cpp:75] Number of files: 9. It seems it can load the data from hdf5 file. @shelhamer , I followed the hdf5 data from scripts src/caffe/test/test_data/generate_sample_data.py. I think this code works on our Test case. Its generate data can also work for new dataset. Is there any work hdf5 dataset and examples here? |
My purpose is to use HDF5 data to represent 1-dim vector data rather than images or matrix. Therefore as @shelhamer said, we can use Caffe as a fast SGD or SVMs. |
I suffer from the same problem.... |
Hi. all. Is it possible to directly read a vector as an input in Caffe? For example, some feature extraction from raw data and it generates a long feature vector in one dimension. I saw most of Caffe examples are working on images and their input data is image/ matrix.
I want to try 1-dim input data. Can anyone give some suggestion or examples? Thank you vech much
The text was updated successfully, but these errors were encountered: