forked from mattans/AgeProgression
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemp.py
More file actions
24 lines (17 loc) · 756 Bytes
/
temp.py
File metadata and controls
24 lines (17 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import matplotlib.pyplot as plt
import numpy as np
from scipy.misc import imsave as ims
def showImagefromBatch(i):
rec_imgs = sess.run(self.generated_images, feed_dict={self.images: batch})
plt.figure()
plt.subplot(1,2,1)
plt.imshow(np.reshape(batch[i],[64,64]))
plt.subplot(1,2,2)
plt.imshow(rec_imgs[i,:,:,0])
def saveBatchBase():
reshaped_vis = visualization.reshape(self.batchsize, 128, 128)
ims("results/base.jpg", merge(reshaped_vis[:64], [8, 8]))
def saveBatchEpoch():
generated_test = sess.run(self.generated_images, feed_dict={self.images: visualization})
generated_test = generated_test.reshape(self.batchsize, 128, 128)
ims("results/" + str(epoch) + ".jpg", merge(generated_test[:64], [8, 8]))