Do not report target tokens per second for unsupervised models
@@ -183,6 +183,7 @@ class Trainer(abc.ABC):
training_loss = self._model.regularize_loss(
training_loss, variables=self._model.trainable_variables)
self._update_words_counter("source", source)
+ if not self._model.unsupervised:
self._update_words_counter("target", target)
if first_call and self._is_master:
if self._checkpoint is not None:
