pbloem / pixel-models

Pytorch implementations of the PixelCNN (va Oord et al. 2016) and PixelVAE (Gulrajani et al. 2016) models
MIT License
31 stars 3 forks source link

PlainMaskedConv2d does not handle connections between color channels #1

Open ethanjyx opened 4 years ago

ethanjyx commented 4 years ago

Hi there, I am trying to get the simple PixelCNN model working on CIFAR10, I took a look at your implementation here https://github.com/pbloem/pixel-models/blob/master/layers.py#L8-L32, and it looks like the masks are only on pixels, but there are no masks among RGB values, is this correct?

pbloem commented 4 years ago

Hi, as far as I remember, the plain version you link to doesn't have connections between color values. This means it predicts each color independently from what it predicts for the other colors. This makes it a much simpler in implementation, but much less powerful than a model that conditions each color on the previous one.

The MaskedConv2d and its two conditional versions do this, but they're a bit more complicated as a result.