sdemyanov / ConvNet

Convolutional Neural Networks for Matlab for classification and segmentation, including Invariang Backpropagation (IBP) and Adversarial Training (AT) algorithms. Trained on GPU, require cuDNN v5.
240 stars 141 forks source link

How to input 6 channels data into 'i' layer #19

Open kklots opened 9 years ago

kklots commented 9 years ago

Hi Sergey,

thank you for sharing this code. Now, I'm trying to train a cnn model from the data which have 6 channels (RGB and some other informations, for example: the depth information). The CPU version and Matlab version can work well, but it fails with the following error when I try to use the CUDA version:

Error using cnntrain_mex Assertion Failed: fa1

Error in cnntrain(line 10) [weights, trainerr]=cnntrain_mex(layers,weights_in,params,train_x,train_y);

How can I fix it, THX.

sdemyanov commented 9 years ago

Hi,

This assertion requires the number of channels to be either <=3 or divisible to 4. This is why it fails with 6 channels. This requirement is a part of kernels from cuda-convnet2, and cannot be fixed quickly. The alternative is to use cuDNN, which should not be difficult, but will also take some time. Sorry for inconvenience.

Regards, Sergey.

kklots commented 9 years ago

Thanks for your advice. It's helpful!

Best wishes, Xuan Li

majdzr commented 8 years ago

Hello Sergey,

Thank you very much for this nice toolbox! I have the same problem (can't use 6 channels), and I've tried to compile everything with CuDNN v3 without any success. Can you please advice me how to do it properly?

Thank you in advance, Majd

sdemyanov commented 8 years ago

Hi Majd,

I think the quickest would be to use MatConvNet, it should be able to work with 6 channels.

Regards, Sergey.