ImageNet-Training icon indicating copy to clipboard operation
ImageNet-Training copied to clipboard

Saved model does not work in onlyTest mode but it works in Training mode

Open marcociccone opened this issue 9 years ago • 2 comments

Hi, I'm having some troubles in evaluating a trained model, save as t7 file. If I reload the model and I continue the training, everything is fine and I'm able to train and test after each epoch, but if I select the flag testOnly the results are wrong and the accuracy is 0.01%..

I do not have clue of what is happening. Can you help me please? Thanks

marcociccone avatar Jun 20 '16 15:06 marcociccone

I think that the saving model procedure doesn't correctly save all the parameters. The error might occur when you train a BatchNormalized model where you have to save also a running_mean and running_std.

I solved the issue by using the method clearState() on the model and then saving it instead of creating a shared copy of the parameters as it is saveModel.

marcociccone avatar Jun 22 '16 08:06 marcociccone

Thankyou @marcociccone . I had an same issue in onlyTest mode with Batchnomalized model.

simonlee0810 avatar Oct 26 '16 03:10 simonlee0810