Fixing script for vae demo
Created by: kahitomi
Recently, I tried running the vae demo, but it did not work well. The problem is caused by the reparameterization funciton, I changed it a bit as follow:
def reparameterization(mu, logvar):
eps = data_layer(name="noise", size=z_dim)
with mixed_layer(act=LinearActivation()) as sigma:
sigma += dotmul_operator(layer_math.sqrt(layer_math.exp(logvar)), eps)
return mu + sigma
The main issue in previous script is setting paramattr as eps. What is more, reducing z_dim size may get better result.
Best wishes