vector-quantize-pytorch
vector-quantize-pytorch copied to clipboard
How to train this?
Hi, I want to use this package to experiment with data different than images (multivariate time series).
I see that the commitment_loss that is returned is not a tensor, but rather a built in float, hence it's not possible to backprop through it.
For now i didn't modify any of my other loss calculation code, i just plugged in the quantizer at the beginning of my architecture, but i'd like to be sure if this is the correct way to go about this.
Thanks and keep up, you're doing god's work with your repositories!
@umbertov hey! so actually the commitment loss is not that important, and you can just set commitment = 0 during init and it should work fine (i built it a long time ago)
however, if you do use any of the auxiliary losses, try the latest version and see if it now work
What do you mean by "the commitment loss is not that important"? Isn't it the main loss that drives the codebook vectors? Could you please clarify how to train this module by adding an example in the readme?