dritchie / pixelCNN

Torch implementation of PixelCNN for MNIST
MIT License
29 stars 8 forks source link

quantize error? #2

Closed insperatum closed 7 years ago

insperatum commented 7 years ago

https://github.com/dritchie/pixelCNN/blob/master/util.lua#L15

If imgData is exactly 1, the pixel quantizes to quantLevels+1

dritchie commented 7 years ago

quantize is designed to work with images that have been passed through normalizeByteImage. That function divides each channel by 256 (see here), so its output can never be exactly 1 (the maximum value of a byte-valued pixel is 255).