Open varisd opened 5 years ago
Do you have a particular example of an error you get?
If everything works correctly, the loss ops are prepared as potential fetches in the runner, but at the time the runner creates an executable, it knows whether the reference is available or not and sets flag compute_losses
accordingly. If there is no reference, the executable replaces the ops with tf.zeros([])
.
I'll try to find a reproducible example.
If there's no reference, losses don't get computed. The logic is implemented in executable's next_to_execute method.
On Mon, Mar 18, 2019, 8:43 AM Dušan Variš notifications@github.com wrote:
I'll try to find a reproducible example.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ufal/neuralmonkey/issues/804#issuecomment-473967405, or mute the thread https://github.com/notifications/unsubscribe-auth/ABwcs_VHnbgTyutVUovnjoLNhDbMQfzaks5vX7Q9gaJpZM4b231a .
Currently, the
train_xent
,runtime_xent
is default fetch in the GreedyRunner. Computation of these requiresreferences
, which might not be available during inference time (e.g. we only want to produce output and not compute xents).This can be sort-of avoided by listing input data also as the reference. However, this may not be completely intuitive to the user.