siamese-fc icon indicating copy to clipboard operation
siamese-fc copied to clipboard

Error in training phase

Open cndylan opened this issue 7 years ago • 7 comments

I try to train the network but meeting an error.

train: epoch 01:   1/5985:Error using vl_nnbnorm
The MOMENTS size does not match the DATA depth.

Error in dagnn.BatchNorm/backward (line 29)
        vl_nnbnorm(inputs{1}, params{1}, params{2}, derOutputs{1}, ...

Error in dagnn.Layer/backwardAdvanced (line 120)
      [derInputs, derParams] = obj.backward ...

Error in dagnn.DagNN/eval (line 117)
  obj.layers(l).block.backwardAdvanced(obj.layers(l)) ;

Error in cnn_train_dag>processEpoch (line 253)
      net.eval(inputs, params.derOutputs, 'holdOn', s < params.numSubBatches) ;

Error in cnn_train_dag (line 105)
    [net, state] = processEpoch(net, state, params, 'train') ;

Error in experiment (line 102)
    [net, stats] = cnn_train_dag(net, imdb, batch_fn, opts.train);

I use matconvnet-1.0-beta25.
can any help provided ?
Thanks

cndylan avatar Nov 25 '17 02:11 cndylan

Hi, unfortunately we are not able to support newer versions of Matconvnet. Does this error arise from the code as it is or did you modify something?

bertinetto avatar Dec 15 '17 10:12 bertinetto

I met the same problem. Have you solved the problem?

xukai8 avatar Dec 28 '17 15:12 xukai8

I simply remove the line 33 in BatchNorm.m
% obj.moments=[ ]; Hope this helps.

nanzxl avatar Dec 29 '17 01:12 nanzxl

Is this problem caused by the different versions? I want to train the model using the last version, I am afraid of the same error.

moorejee avatar Mar 16 '18 01:03 moorejee

I met the same problem. Have you solved the problem?

NeverMoreLCH avatar Oct 18 '18 08:10 NeverMoreLCH

Oh, I might solve the problem so that the training process can start. But I don't know if some other questions will occur.

I change the code in BatchNorm.m. At line 32, remove the parameter 'moments'. And remove the line 33.

NeverMoreLCH avatar Oct 18 '18 09:10 NeverMoreLCH

Oh, I might solve the problem so that the training process can start. But I don't know if some other questions will occur.

I change the code in BatchNorm.m. At line 32, remove the parameter 'moments'. And remove the line 33.

Solved my problem, hope not affect the final training results.

ZZXin avatar Apr 27 '19 13:04 ZZXin