Skip to content

Commit dde6d8c

Browse files
committed
Adjust parameters
1 parent 757dc6e commit dde6d8c

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

Main.py

+18-18
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
import matplotlib.image as mpimg
1313
import pylab
1414

15-
num_steps = 3000
16-
learning_rate = 12e-5
15+
num_steps = 6000
16+
learning_rate = 15e-5
1717
batch_size = 128
1818
show_every = 1000
1919
num_evals = 100
@@ -44,7 +44,7 @@ def main():
4444
optim = AdamOptimizer(learning_rate, 0.95, 0.95)
4545
losses = []
4646

47-
stack = RBMStack([784, 512, 64])
47+
stack = RBMStack([784, 256, 64])
4848
img, _ = SelectBatch(data['train_X'], 1)
4949
#rbm = RBM(784, 64)
5050
rbm = stack.Stack()[0]
@@ -85,21 +85,21 @@ def main():
8585
#recon = rbm.CycleContinuous(img)
8686
plot_dual(img, recon)
8787
"""
88-
89-
fullimage = []
90-
for col_step in range(10):
91-
column = []
92-
for row_step in range(10):
93-
img, _ = SelectBatch(data['train_X'], 1)
94-
recon, _ = autoencoder.EvaluateFull(img)
95-
img1 = img.reshape(28, 28)
96-
img2 = recon.reshape(28, 28)
97-
#disp = np.concatenate((img1, img2), axis=1)
98-
disp = np.hstack([img1, img2])
99-
column.append(disp)
100-
fullimage.append(np.vstack(column))
101-
plt.imshow(np.hstack(fullimage), cmap='Greys')
102-
pylab.show()
88+
for step in range(num_evals):
89+
fullimage = []
90+
for col_step in range(10):
91+
column = []
92+
for row_step in range(10):
93+
img, _ = SelectBatch(data['train_X'], 1)
94+
recon, _ = autoencoder.EvaluateFull(img)
95+
img1 = img.reshape(28, 28)
96+
img2 = recon.reshape(28, 28)
97+
#disp = np.concatenate((img1, img2), axis=1)
98+
disp = np.hstack([img1, img2])
99+
column.append(disp)
100+
fullimage.append(np.vstack(column))
101+
plt.imshow(np.hstack(fullimage), cmap='Greys')
102+
pylab.show()
103103

104104

105105

0 commit comments

Comments
 (0)