In src/IBQ/modules/vqvae/quantize.py, the quantization loss is computed as:
quant_loss = torch.mean((z_q - z)**2) + torch.mean((z_q_2.detach()-z)**2) + self.beta * \
torch.mean((z_q_2 - z.detach()) ** 2)
However, in the paper, the equation is:
Does this affect the results?
In
src/IBQ/modules/vqvae/quantize.py, the quantization loss is computed as:However, in the paper, the equation is:
Does this affect the results?