Closed insperatum closed 7 years ago
https://github.com/dritchie/pixelCNN/blob/master/util.lua#L15
If imgData is exactly 1, the pixel quantizes to quantLevels+1
quantLevels+1
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).
quantize
normalizeByteImage
https://github.com/dritchie/pixelCNN/blob/master/util.lua#L15
If imgData is exactly 1, the pixel quantizes to
quantLevels+1