ufal / neuralmonkey

An open-source tool for sequence learning in NLP built on TensorFlow.
BSD 3-Clause "New" or "Revised" License
410 stars 106 forks source link

DelayedUpdateTrainer.objective_buffers called twice without variable reuse #788

Closed varisd closed 5 years ago

varisd commented 5 years ago

Atrribute Method DelayedUpdateTrainer.objective_buffers is being called twice,

once in: https://github.com/ufal/neuralmonkey/blob/master/neuralmonkey/trainers/delayed_update_trainer.py#L156

and second time in: https://github.com/ufal/neuralmonkey/blob/master/neuralmonkey/trainers/delayed_update_trainer.py#L173

There is no explicit specification of the variable reuse so I assume that each class method works with a different list of graph variables. Next time, I recommend using tf.get_variable + proper naming instead of using carelessly using tf.Variable

jindrahelcl commented 5 years ago

self.objective_buffers je @tensor, takže se volá jen jednou.