Skip to content

Commit 0a71411

Browse files
committed
Fixed reconstruction a bit
1 parent fcbbb82 commit 0a71411

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

recognition/44801582_OASIS_VAE/predict.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,13 @@ def plot_reconstructions():
7777
vqvae = modules.VQVAE(16, 128)
7878
vqvae.load_weights("samples/vqvae_model_weights.h5")
7979
_, _, test_data, _ = dataset.oasis_dataset(500)
80-
num_tests = 8
81-
test_images = test_data[np.random.choice(len(test_data), 8)]
80+
81+
num_tests = 4
82+
test_images = test_data[np.random.choice(len(test_data), num_tests)]
8283
reconstructions = vqvae.predict(test_images)
8384

8485
i = 0
85-
plt.figure(figsize=(4, num_tests * 2), dpi=512)
86+
plt.figure(figsize=(num_tests * 2, 4), dpi=512)
8687
for test_image, reconstructed_image in zip(test_images, reconstructions):
8788
test_image = test_image.squeeze()
8889
reconstructed_image = reconstructed_image[:, :, 0]

0 commit comments

Comments
 (0)