Skip to content

Commit

Permalink
Fixing logging for small batch sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
mdfirman committed Jun 3, 2019
1 parent 65eac3c commit 5cc5c85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ def log(self, mode, inputs, outputs, losses):
for l, v in losses.items():
writer.add_scalar("{}".format(l), v, self.step)

for j in range(4): # only write four images
for j in range(min(4, self.opt.batch_size)): # write a maxmimum of four images
for s in self.opt.scales:
for frame_id in self.opt.frame_ids:
writer.add_image(
Expand Down

0 comments on commit 5cc5c85

Please sign in to comment.