Skip to content
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

Error in fcnInitializeModel.m #12

Open
HuguesTHOMAS opened this issue Jan 6, 2016 · 3 comments
Open

Error in fcnInitializeModel.m #12

HuguesTHOMAS opened this issue Jan 6, 2016 · 3 comments

Comments

@HuguesTHOMAS
Copy link

I was going through your code to adapt it to the Kitti Benchmark, and i found an error in fcnTrain. More particularly in the function fcnInitializeModel.m here :

LINE 49 -LINE 55
% Modify the last fully-connected layer to have 21 output classes
% Initialize the new filters to zero
for i = net.getParamIndex(net.layers(end-1).params) ;
sz = size(net.params(i).value) ;
sz(end) = 21 ;
net.params(i).value = zeros(sz, 'single') ;
end

This is not working as for i=2, BIASES size is [1000,1]. Thus modifying sz(end) is wrong because you want to change 1000 to 21.
This mistake leads to an error when try to train the network, but you can easily correct it by changing
sz(end) = 21 ;
into
sz(sz == 1000) = 21 ;

This is it. By the way I wanted some advice concerning the training of the model on Kitti dataset. As there are only 2 classes : road and background, is it good to keep the same type of loss function as with PASCAL dataset? I keep being stuck at around 54% accuracy which is pretty bad

@HuguesTHOMAS
Copy link
Author

By the way the matlab error this typo leads to was already posted in another issue posted by omrysendik.

Error using vl_nnconv
The number of elements of BIASES is not the same as the number of filters.

He proposed anther correction which is good too

@ljpadam
Copy link

ljpadam commented Jan 23, 2016

Thanks, it really help me

@17shasvatj
Copy link

Did you ever figure out how to get the accuracy up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants