vector-quantize-pytorch icon indicating copy to clipboard operation
vector-quantize-pytorch copied to clipboard

output dimensions for vector quantize

Open dorsa-zeinali opened this issue 1 year ago • 2 comments
trafficstars

Hi, I have data that is the shape (batch, channel, height, width), I want to quantize it and I was wondering what the dimension of the vectorquantizer should be. I tried dim=height, but it produces something of dimensions [1, channel] when I need something of the dimension [batch, channel]. any help would be appreciated. thanks

dorsa-zeinali avatar Oct 28 '24 16:10 dorsa-zeinali

could you show a short example script? I can make the correction for you easier that way

lucidrains avatar Oct 28 '24 17:10 lucidrains

Screenshot 2024-10-28 at 1 25 36 PM Here is the description of my model. my code is rather long , should I include other information? although I solved the issue by setting the batch size to 1. If I train this network, will it also update the codebook with the optimizer? or will the updates just be ema ?

dorsa-zeinali avatar Oct 28 '24 17:10 dorsa-zeinali