-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Open
Description
In the code, β times zq-z.detach()
,
CodeFormer/basicsr/archs/vqgan_arch.py
Line 55 in e878192
loss = torch.mean((z_q.detach()-z)**2) + self.beta * torch.mean((z_q - z.detach()) ** 2) |
but i think it should times the commitment loss
zq.detach()-z
to control the learning of Encoder, referred to the CoderFormer and VQVAE papers.Although the VQVAE paper pointed that
the results did not vary for values of β ranging from 0.1 to 2.0
β (in the code) is placed in the wrong place and set to be 0.25, leading to the weight of the commitment loss, the real β, being 4.0.
Is there a slight possibility that it will affect the performance of VQVAE?
Metadata
Metadata
Assignees
Labels
No labels