Skip to content

Commit

Permalink
Update final_vae.py
Browse files Browse the repository at this point in the history
  • Loading branch information
benyaminjami authored May 6, 2020
1 parent ae46a6c commit fa85ca8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions final_vae.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
#%%

K.clear_session()
tf.set_random_seed(0)
#tf.set_random_seed(0)
np.random.seed(0)

#from keras.mode import Model
Expand All @@ -83,7 +83,7 @@
#reparameterization trick
def sampling(args):
z_mean, z_log_var = args
epsilon = K.random_normal(shape=(K.shape(z_mean)[0],K.shape(z_mean)[1],K.shape(z_mean)[2],K.shape(z_mean)[3]), mean=0.,
epsilon = tf.random.normal(shape=(K.shape(z_mean)[0],K.shape(z_mean)[1],K.shape(z_mean)[2],K.shape(z_mean)[3]), mean=0.,
stddev=1.0)
return z_mean + K.exp(z_log_var / 2) * epsilon

Expand Down Expand Up @@ -180,4 +180,4 @@ def schedule(epoch, lr):

# vae.load_weights()
vae.fit(X_train_norm, X_train_norm, shuffle=True, epochs=1000, batch_size=64,
validation_data=(X_validation_norm, X_validation_norm), callbacks=[lrate, chckpnt, csv])
validation_data=(X_validation_norm, X_validation_norm), callbacks=[lrate, chckpnt, csv])

0 comments on commit fa85ca8

Please sign in to comment.