Commit 3f90a0c3 authored by Pietro Morerio's avatar Pietro Morerio
Browse files

Merge branch 'master' of gitlab.iit.it:pmorerio/siamese-tf

parents d315be6f b06fd449
......@@ -7,11 +7,16 @@ from skimage.util import random_noise
def show_batch(batch):
fig = plt.figure()
gs = gridspec.GridSpec(1,len(batch))
gs = gridspec.GridSpec(2,len(batch))
for i in range(len(batch)):
ax = fig.add_subplot(gs[0,i])
ax.imshow(batch[i,:,:,0], cmap='gray')
ax.axis('off')
ax = fig.add_subplot(gs[1,i])
ax.imshow(add_defect(batch[i,:,:,0]), cmap='gray')
ax.axis('off')
plt.show()
......@@ -30,10 +35,7 @@ def main():
len_test = len(mnist.test.images)
len_train = len(mnist.train.images)
batch=train_images[10:20]
for i, image in enumerate(batch):
batch[i]=add_defect(image)
batch=train_images[15:20]
show_batch(batch)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment