zhanghang1989 / ResNet-Matconvnet

Train Deep Residual Network from Scratch or or Fine-tune Pre-trained Model using Matconvnet
http://zhanghang1989.github.io/ResNet/
MIT License
82 stars 44 forks source link

Changing dataset to single channel #3

Closed wajihullahbaig closed 8 years ago

wajihullahbaig commented 8 years ago

Hi again :) I have made some changes to run your code on a single channel 28x28x7000 image dataset. So far I have made changes to getCifarImdb() which works for the new dataset. I have been able to get hold of the 'augData' Right now it seems that the parameters that initialize the plain/resnet need to be fixed as I get error while performing convolution on the very first epoch

Error using vl_nnconv The number of filter groups does not divide the number of filters.

Error in dagnn.Conv/forward (line 11) outputs{1} = vl_nnconv(...

Error in dagnn.Layer/forwardAdvanced (line 85) outputs = obj.forward(inputs, {net.params(par).value}) ;

Error in dagnn.DagNN/eval (line 88) obj.layers(l).block.forwardAdvanced(obj.layers(l)) ;

Error in cnn_train_dag_check>process_epoch (line 218) net.eval(inputs, opts.derOutputs) ;

Error in cnn_train_dag_check (line 84) [stats.train(epoch),prof] = process_epoch(net, state, opts, 'train') ;

Error in res_mnist (line 75)

Can you tell me which parameters I need to set correct so that I can run your code on my own dataset?

zhanghang1989 commented 8 years ago

There are several examples for getting imdb, please see the link.