Skip to content

Commit

Permalink
Update main.py (pytorch#520)
Browse files Browse the repository at this point in the history
  • Loading branch information
zuoxingdong authored and soumith committed Mar 6, 2019
1 parent 87d9a1e commit 67e5b06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vae/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def encode(self, x):
def reparameterize(self, mu, logvar):
std = torch.exp(0.5*logvar)
eps = torch.randn_like(std)
return eps.mul(std).add_(mu)
return mu + eps*std

def decode(self, z):
h3 = F.relu(self.fc3(z))
Expand Down

0 comments on commit 67e5b06

Please sign in to comment.