Caffe for time series Data

765 views
Skip to first unread message

Abhishek Sharma

unread,
Jun 29, 2015, 6:29:13 AM6/29/15
to caffe...@googlegroups.com
I am working on 1D data to classify it into two classes. I am using caffe. My data has 2000 samples. I have made an hdf5 file containing two data sets - 'data and label'.  I am using the network definition similar to MNIST but with hdf5 input. But, every time I try to train the network it gives the following error:


I0629 14:53:52.153496  3751 layer_factory.hpp:74] Creating layer mnist
I0629 14:53:52.153542  3751 net.cpp:90] Creating Layer mnist
I0629 14:53:52.153568  3751 net.cpp:368] mnist -> data
I0629 14:53:52.153614  3751 net.cpp:368] mnist -> label
I0629 14:53:52.153650  3751 net.cpp:120] Setting up mnist
I0629 14:53:52.153671  3751 hdf5_data_layer.cpp:80] Loading list of HDF5 filenames from: examples/1D_hdf5/Data/Train.txt
I0629 14:53:52.153738  3751 hdf5_data_layer.cpp:94] Number of HDF5 files: 1
I0629 14:53:52.193681  3751 net.cpp:127] Top shape: 47 1 1 2000 (94000)
I0629 14:53:52.193735  3751 net.cpp:127] Top shape: 47 1 (47)
I0629 14:53:52.193758  3751 layer_factory.hpp:74] Creating layer conv1
I0629 14:53:52.193792  3751 net.cpp:90] Creating Layer conv1
I0629 14:53:52.193814  3751 net.cpp:410] conv1 <- data
I0629 14:53:52.193840  3751 net.cpp:368] conv1 -> conv1
I0629 14:53:52.193871  3751 net.cpp:120] Setting up conv1
F0629 14:53:52.194491  3751 blob.cpp:28] Check failed: shape[i] >= 0 (-3 vs. 0) 
*** Check failure stack trace: ***
    @     0x7f4b774e5daa  (unknown)
    @     0x7f4b774e5ce4  (unknown)
    @     0x7f4b774e56e6  (unknown)
    @     0x7f4b774e8687  (unknown)
    @     0x7f4b7786c2e7  caffe::Blob<>::Reshape()
    @     0x7f4b7786c4c9  caffe::Blob<>::Reshape()
    @     0x7f4b778d22a8  caffe::BaseConvolutionLayer<>::Reshape()
    @     0x7f4b7785b342  caffe::Net<>::Init()
    @     0x7f4b7785d0a2  caffe::Net<>::Net()
    @     0x7f4b77843ae0  caffe::Solver<>::InitTrainNet()
    @     0x7f4b77844a83  caffe::Solver<>::Init()
    @     0x7f4b77844c56  caffe::Solver<>::Solver()
    @           0x40c2f0  caffe::GetSolver<>()
    @           0x4062c3  train()
    @           0x4048d1  main
    @     0x7f4b769f7ec5  (unknown)
    @           0x404e7d  (unknown)
    @              (nil)  (unknown)
Aborted (core dumped)

Pls help!!

Abhishek Sharma

unread,
Jun 29, 2015, 7:08:36 AM6/29/15
to caffe...@googlegroups.com
This is the train.h5 file.

HDF5 train.h5 
Group '/' 
    Dataset 'data' 
        Size:  2000x1x1x2399
        MaxSize:  2000x1x1x2399
        Datatype:   H5T_IEEE_F64LE (double)
        ChunkSize:  []
        Filters:  none
        FillValue:  0.000000
    Dataset 'label' 
        Size:  1x2399
        MaxSize:  1x2399
        Datatype:   H5T_IEEE_F64LE (double)
        ChunkSize:  []
        Filters:  none
        FillValue:  0.000000

Leif Blaese

unread,
Jul 9, 2015, 6:46:17 AM7/9/15
to caffe...@googlegroups.com




I0629 14:53:52.193758  3751 layer_factory.hpp:74] Creating layer conv1
I0629 14:53:52.193792  3751 net.cpp:90] Creating Layer conv1
I0629 14:53:52.193814  3751 net.cpp:410] conv1 <- data
I0629 14:53:52.193840  3751 net.cpp:368] conv1 -> conv1
I0629 14:53:52.193871  3751 net.cpp:120] Setting up conv1
F0629 14:53:52.194491  3751 blob.cpp:28] Check failed: shape[i] >= 0 (-3 vs. 0) 

 
Well, caffe complains about the shape of the data. It seems like one dimension of the kernel is 0? Maybe the kernel has a larger size (in the height dimension) than your input. Change the input to a 2-D format or change the kernel so that is has a kernel_h of 1 (look up convolutional parameters in the caffe tutorial). Try and play around with the parameters until they fit... ;)

For further help, show the whole architecture and not only the first two layers so we know where the error is.



Reply all
Reply to author
Forward
0 new messages