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

Unify dropout usage #800

Open jindrahelcl opened 5 years ago

jindrahelcl commented 5 years ago

There are two clashing ways to use dropout in model parts - on the output or the input.

@varisd suggested going with the first option (each model part is responsible for dropping out its outputs), but this requires a greater deal of work since the majority of the codebase is done the other way (except for transformer components).

I now prefer the first option. We could even introduce a new decorator which would apply dropout on a returned value from the decorated method, provided that the class has the dropout_keep_prob field.