fixed a minor error in vae

This commit is contained in:
JayParks
2017-08-06 10:08:31 +09:00
parent 4b67434961
commit d40cc81afb

View File

@ -65,7 +65,7 @@ data_iter = iter(data_loader)
# fixed inputs for debugging
fixed_z = to_var(torch.randn(100, 20))
fixed_x, _ = next(data_iter)
torchvision.utils.save_image(fixed_x.data.cpu(), './data/real_images.png')
torchvision.utils.save_image(fixed_x.cpu(), './data/real_images.png')
fixed_x = to_var(fixed_x.view(fixed_x.size(0), -1))
for epoch in range(50):
@ -95,4 +95,4 @@ for epoch in range(50):
reconst_images, _, _ = vae(fixed_x)
reconst_images = reconst_images.view(reconst_images.size(0), 1, 28, 28)
torchvision.utils.save_image(reconst_images.data.cpu(),
'./data/reconst_images_%d.png' %(epoch+1))
'./data/reconst_images_%d.png' %(epoch+1))