pytorch-vqvae icon indicating copy to clipboard operation
pytorch-vqvae copied to clipboard

labels in the PixelCNN

Open ZhanYangen opened this issue 4 years ago • 0 comments

Hi, I have trained the VQVAE network on my own dataset comprise of 10,000 images of 64×64 pixels without any labels. In order to train PixelCNN network, I faked some labels like this: label_set=torch.zeros((10000,1), dtype=torch.int64) However, the shape of my faked labels seems not to fit in the code. In modules.py, there is this line out_v = self.gate(h_vert + h[:, :, None, None]) in GatedMaskedConv2d.forward, where h is the label. In this way, the shape of h_vert would be (batch, 2×dim, 16, 16), but the shape of h would be (batch, 1, 2×dim). So can anyone tell me how to deal with the labels? Thanks.

ZhanYangen avatar Jan 27 '21 08:01 ZhanYangen