Open wujian752 opened 7 years ago
I met the same questions and I haven't understand why. I think the trained model may exchanged the parameters or gradparameters in a wrong way when training so it doesn't work.
I use this method:
params = {} for i = 1,21 do params[i] = model:get(i):getParameters() end torch.save(params[i])
to get the params in every layer(and 21 is the layer in my model). and then use these params to value a new model i create.
I have tried to initialize the model with a trained model.
However, when I set the 'start_from' to the path to the trained model, I got an error as shown below.
It seems the storageOffset of parameters and gradParameters are not same because of the net_utils.unsanitize_gradients and net_utils.sanitize_gradients.