binarize()
How exactly does the binarize function work in the code? How do I extend it to the CIFAR model? How does comparing images with random numbers work?
Please check the 5.6 part of the Paper: Pixel Recurrent Networks
@han-qiu , how does that explain the comparison of images with random numbers in the code (in binarize function to be specific)?
I'm confused about this binarize function exactly as you did. Please let me know if you found an explanation. Thank you! @Kaustubh-Sable
1.make all input pixels to 0 or 1 2. The generation procedure begins with a all zero tensor as input. At each iteration, the network predicts one pixel out and that pixel is updated in the zero tensor. However, since the network is fixed after training, the prediction is fixed. So, there is no randomness in this generation procedure. The binarize function introduce randomness into the procedure. From some pixel, the input can vary, so the network can generate different numbers.