ufal / neuralmonkey

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

Neural Monkey should throw Exception when tf.Saver.restore fails #821

Open varisd opened 5 years ago

varisd commented 5 years ago

Try-catch block at https://github.com/ufal/neuralmonkey/blob/master/neuralmonkey/learning_utils.py#L250

Print a warning, when tf.Saver.restore while ignoring the caught exception. This leads to a confusing behavior where user might think that the variables present in the checkpoint were correctly loaded. This is not true, since the variable loading is halted when the exception is thrown.