Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions ch12/autoencoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ def call(self, inputs, training=None):
x_hat = tf.reshape(x_hat, [-1, 28, 28])

# [b, 28, 28] => [2b, 28, 28]
x_concat = tf.concat([x, x_hat], axis=0)
x_concat = x_hat
x_concat = tf.concat([x[:50], x_hat[:50]], axis=0)
x_concat = x_concat.numpy() * 255.
x_concat = x_concat.astype(np.uint8)
save_images(x_concat, 'ae_images/rec_epoch_%d.png'%epoch)
2 changes: 1 addition & 1 deletion ch12/vae.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def call(self, inputs, training=None):
model.build(input_shape=(4, 784))
optimizer = tf.optimizers.Adam(lr)

for epoch in range(1000):
for epoch in range(100):

for step, x in enumerate(train_db):

Expand Down