Skip to content

Commit 61774df

Browse files
committed
Merge branch 'master' of https://github.com/wcshin-git/taming-transformers-forked into wcshin-git-master
2 parents e6bf330 + 681709c commit 61774df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

taming/modules/vqvae/quantize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def forward(self, z):
7070
# ......\end......... (TODO)
7171

7272
# compute loss for embedding
73-
loss = torch.mean((z_q.detach()-z)**2) + self.beta * \
73+
loss = self.beta * torch.mean((z_q.detach()-z)**2) + \
7474
torch.mean((z_q - z.detach()) ** 2)
7575

7676
# preserve gradients

0 commit comments

Comments
 (0)