We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fcbbb82 commit 0a71411Copy full SHA for 0a71411
recognition/44801582_OASIS_VAE/predict.py
@@ -77,12 +77,13 @@ def plot_reconstructions():
77
vqvae = modules.VQVAE(16, 128)
78
vqvae.load_weights("samples/vqvae_model_weights.h5")
79
_, _, test_data, _ = dataset.oasis_dataset(500)
80
- num_tests = 8
81
- test_images = test_data[np.random.choice(len(test_data), 8)]
+
+ num_tests = 4
82
+ test_images = test_data[np.random.choice(len(test_data), num_tests)]
83
reconstructions = vqvae.predict(test_images)
84
85
i = 0
- plt.figure(figsize=(4, num_tests * 2), dpi=512)
86
+ plt.figure(figsize=(num_tests * 2, 4), dpi=512)
87
for test_image, reconstructed_image in zip(test_images, reconstructions):
88
test_image = test_image.squeeze()
89
reconstructed_image = reconstructed_image[:, :, 0]
0 commit comments