Update.
authorFrançois Fleuret <francois@fleuret.org>
Sun, 3 Mar 2024 11:18:25 +0000 (12:18 +0100)
committerFrançois Fleuret <francois@fleuret.org>
Sun, 3 Mar 2024 11:18:25 +0000 (12:18 +0100)
tiny_vae.py

index cba42e1..405c103 100755 (executable)
@@ -141,7 +141,7 @@ class ImageGivenLatentNet(nn.Module):
     def forward(self, z):
         output = self.model(z.view(z.size(0), -1, 1, 1))
         mu, log_var = output[:, 0:1], output[:, 1:2]
-        log_var.flatten(1)[...] = log_var.flatten(1)[:, :1]
+        log_var.flatten(1)[...] = log_var.flatten(1)[:, :1]
         return mu, log_var