Spaces:
Running
Running
coledie
commited on
Commit
·
0b750fc
1
Parent(s):
8ce78b0
Update model.
Browse files
vae.pt
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 3480699
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:af795c0c5461e246c1a45230282fd7754a1572b983c0af3d08353edfb66874fc
|
3 |
size 3480699
|
vae.py
CHANGED
@@ -59,6 +59,6 @@ class VAE(nn.Module):
|
|
59 |
def forward(self, x):
|
60 |
x = x.reshape((-1, 1, *self.image_dim))
|
61 |
mu, sigma = self.encoder(x)
|
62 |
-
c = mu + sigma * torch.randn_like(sigma)
|
63 |
xhat = self.decoder(c)
|
64 |
return xhat, mu, sigma
|
|
|
59 |
def forward(self, x):
|
60 |
x = x.reshape((-1, 1, *self.image_dim))
|
61 |
mu, sigma = self.encoder(x)
|
62 |
+
c = mu + sigma * torch.randn_like(sigma) * 2
|
63 |
xhat = self.decoder(c)
|
64 |
return xhat, mu, sigma
|