mirror of
https://github.com/yunjey/pytorch-tutorial.git
synced 2025-07-05 00:24:02 +08:00
fixed a minor error in vae
This commit is contained in:
@ -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))
|
||||
|
Reference in New Issue
Block a user