Skip to content

Commit 172c802

Browse files
committed
Fix images in Tensorboard
1 parent 9609dcb commit 172c802

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main_miniimagenet.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ def main(args):
104104
loss, _ = test(valid_loader, model, args, writer)
105105

106106
reconstruction = generate_samples(fixed_images, model, args)
107-
grid = make_grid(reconstruction, nrow=8, range=(-1, 1), normalize=True)
108-
writer.add_image('reconstruction', reconstruction.cpu(), epoch)
107+
grid = make_grid(reconstruction.cpu(), nrow=8, range=(-1, 1), normalize=True)
108+
writer.add_image('reconstruction', grid, epoch)
109109

110110
if (epoch == 0) or (loss < best_loss):
111111
best_loss = loss

0 commit comments

Comments
 (0)