yechengxi / LightNet

Efficient, transparent deep learning in hundreds of lines of code.
Other
270 stars 116 forks source link

A problem for your developed LightNet #6

Closed tzczsq closed 7 years ago

tzczsq commented 7 years ago

Hi, I am trying use your LightNet to implement RNN/CNN in Matlab2015a, but failed. It seems that there is no successful demo. Could you please tell me why? The error information of performing Main_Char_RNN:

%%%%%%%%%%%%%%%%%%%%%%%% Error using + Matrix dimensions must agree. Error in linear_layer (line 56) y=y+bias; Error in net_ff (line 40) [res(layer+1).x,~,~,opts] = linear_layer( res(layer).x,net.layers{1,layer}.weights{1},net.layers{1,layer}.weights{2},[], opts);

Error in lstm_ff (line 45) [ net{1},res.Gates{f},opts ] = net_ff( net{1},res.Gates{f},opts );

Error in train_rnn (line 29) [ net,res,opts ] = lstm_ff( net,opts );

Error in Main_Char_RNN (line 146) [net,opts]=train_rnn(net,opts);

%%%%%%%%%%%%%%%%%%%%%%% The error information of performing Main_CNN_ImageNet_minimal Error using + Matrix dimensions must agree. Error in conv_layer_2d (line 103) y=y+bias_p;

Error in net_ff (line 37) [res(layer+1).x,~,~,opts] = conv_layer_2d( res(layer).x,net.layers{1,layer}.weights{1},net.layers{1,layer}.weights{2},net.layers{1,layer}.stride,net.layers{1,layer}.pad,[],opts );

Error in Main_CNN_ImageNet_minimal (line 33) [ net,res,opts ] = net_ff( net,res,opts ); %%%%%%%%%%%%%%%

yechengxi commented 7 years ago

We recently used the implicit expansion feature that is introduced in Matlab R2016b to replace the bsxfun which we used in our previous commits. please try to use this version or later to run LightNet.