pclucas14 / pixel-cnn-pp

Pytorch Implementation of OpenAI's PixelCNN++
Other
344 stars 76 forks source link

Trouble understanding some code snippet #20

Closed neverUseThisName closed 4 years ago

neverUseThisName commented 4 years ago

In discretized_mix_logistic_loss in utils.py Image 13 It corresponds to Image 14 But I'm confused with coeffs[:, :, :, 0, :] * x[:, :, :, 0, :] part. Why it conditions on input image x? It seems it predicts the logistic means of G channel based on the R channel of the real image rather than on the predicted R channel. How is input real image accessible at inference time?

neverUseThisName commented 4 years ago

It seems it's used to calc loss not inference.