Fix eval loss computation bug
@@ -85,9 +85,6 @@ def get_results_for_epoch(model, sess, compute_loss, mode, verbose=False):
outputs[-1], last_batch_size % model.params['batch_size_per_gpu'],
)
if compute_loss:
- loss *= last_batch_size
- total_samples += last_batch_size
- elif compute_loss:
loss *= model.params['batch_size_per_gpu']
total_samples += model.params['batch_size_per_gpu']
