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

Model refactor #773

Closed jindrahelcl closed 5 years ago

jindrahelcl commented 5 years ago

Read the commit messages.

ModelPart is now a syntactic sugar class for these three abstract classes: Parameterized - manages variables, name scopes, loading and saving Feedable - has feed_dict, batch_size, and train_mode (in the future, may also contain some logic for creating placeholders or handling data in tf.dataset) GenericModelPart - the get_dependencies function is now here and all the classes that handle something in the graph before runners and/or trainers are descendants of this class

as a bonus, this PR fixes the dependenies gradient blocking objects and provides a way of how to do it e.g. for adversarial gradient layers introduced in #771

jindrahelcl commented 5 years ago

Zdokumentováno...

jindrahelcl commented 5 years ago

This is ready for review.