Conditional-PixelCNN-decoder icon indicating copy to clipboard operation
Conditional-PixelCNN-decoder copied to clipboard

binarize()

Open Kaustubh-Sable opened this issue 8 years ago • 4 comments

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?

Kaustubh-Sable avatar Feb 15 '17 05:02 Kaustubh-Sable

Please check the 5.6 part of the Paper: Pixel Recurrent Networks

han-qiu avatar Apr 08 '17 15:04 han-qiu

@han-qiu , how does that explain the comparison of images with random numbers in the code (in binarize function to be specific)?

Kaustubh-Sable avatar Apr 09 '17 05:04 Kaustubh-Sable

I'm confused about this binarize function exactly as you did. Please let me know if you found an explanation. Thank you! @Kaustubh-Sable

hope-yao avatar Jul 09 '17 23:07 hope-yao

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.

yuffon avatar Jun 03 '19 07:06 yuffon