Skip to content

Commit 3e017d0

Browse files
committed
Fix visualize_dataset function
1 parent 948a6e6 commit 3e017d0

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

boiling_learning/preprocessing/visualize.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -497,12 +497,10 @@ def _make_ds(params: Parameters) -> tf.data.Dataset:
497497
n_samples,
498498
1,
499499
subplot_spec=outer[elem],
500-
# wspace=0.1,
501-
# hspace=0.1
502500
)
503-
for sample, (img, _) in enumerate(
504-
ds_split.take(n_samples).as_numpy_iterator()
505-
):
501+
for sample, (img, _) in enumerate(ds_split.take(n_samples)):
502+
img = tf.image.convert_image_dtype(img, tf.uint8)
503+
506504
ax = plt.Subplot(fig, inner[sample])
507505
img = np.squeeze(img)
508506
ax.imshow(img, cmap='gray', norm=NoNorm())

0 commit comments

Comments
 (0)