Open eembees opened 3 years ago
@eembees I also think the same
original tf code is the same as in the paper:
e_latent_loss = tf.reduce_mean((tf.stop_gradient(quantized) - inputs) ** 2)
q_latent_loss = tf.reduce_mean((quantized - tf.stop_gradient(inputs)) ** 2)
loss = q_latent_loss + self._commitment_cost * e_latent_loss
maybe is wrong here
referencing this line:
https://github.com/MishaLaskin/vqvae/blob/d761a999e2267766400dc646d82d3ac3657771d4/models/quantizer.py#L63-L64
From what I can read in the paper the loss is :
but in this code it seems to me to be backwards, I.E.