anantzoid / Conditional-PixelCNN-decoder

Tensorflow implementation of Gated Conditional Pixel Convolutional Neural Network
485 stars 83 forks source link

binarize() #1

Open Kaustubh-Sable opened 7 years ago

Kaustubh-Sable commented 7 years ago

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?

han-qiu commented 7 years ago

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

Kaustubh-Sable commented 7 years ago

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

hope-yao commented 7 years ago

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

yuffon commented 5 years ago

1.make all input pixels to 0 or 1

  1. 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.