ufal / neuralmonkey

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

Initialize model building in runners #535

Open jindrahelcl opened 7 years ago

jindrahelcl commented 7 years ago

Now, some parts of the model are not initialized due to the lazy @tensor annotations. Therefore, their initialization must be forced for example by printing out the affected tensors.

This must be either avoided or moved to the code of the runners, instead of the __init__ methods of the model parts.

jlibovicky commented 6 years ago

We need to make sure that all output-generating model parts call their output in their output in the __init__ method, so at least the inference part of the graph is always initialized.