Created
July 28, 2021 19:55
-
-
Save a-agmon/45457f370c0d0ca8fb83e7f16c1784ef to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def sample(args): | |
z_mean, z_log_var = args | |
batch = K.shape(z_mean)[0] | |
dim = K.int_shape(z_mean)[1] | |
epsilon = K.random_normal(shape=(batch, dim)) | |
return z_mean + K.exp(0.5 * z_log_var) * epsilon | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment