Skip to content

Commit f41e020

Browse files
committed
Merge branch 'master' of https://github.com/tech-srl/code2seq
2 parents f4278e5 + 47a4372 commit f41e020

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

model.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def train(self):
131131

132132
def trace(self, sum_loss, batch_num, multi_batch_start_time):
133133
multi_batch_elapsed = time.time() - multi_batch_start_time
134-
avg_loss = sum_loss / (self.num_batches_to_log * self.config.BATCH_SIZE)
134+
avg_loss = sum_loss / self.num_batches_to_log
135135
print('Average loss at batch %d: %f, \tthroughput: %d samples/sec' % (batch_num, avg_loss,
136136
self.config.BATCH_SIZE * self.num_batches_to_log / (
137137
multi_batch_elapsed if multi_batch_elapsed > 0 else 1)))

0 commit comments

Comments
 (0)