macournoyer / neuralconvo

Neural conversational model in Torch
776 stars 347 forks source link

model:getParameters() used multiple times #57

Open nabihach opened 7 years ago

nabihach commented 7 years ago

For the function model:getParameters(), here's what the documentation (https://github.com/torch/nn/blob/master/doc/module.md#flatparameters-flatgradparameters-getparameters) says:

Since the storage of every weight and gradWeight is changed, this function should be called only once on a given network.

However, in train.lua, this function gets called once every epoch. I'm not entirely sure how this affects the model or the results though. In any case, just putting this out there.