igul222/PixelVAE

line 864-872 in pixelvae.py

Lucas2012 opened this issue · 4 comments

Hi,

Could you please explain what you're doing in the line 864 to 872?

You seems to be generating the images but why not directly take the np.argmax and pick the channels with largest softmax probability?

Each softmax is conditioned on the values of all the previous pixels and channels, so we need to generate sequentially. Within each step, we could take argmax (and in fact doing so sometimes produces interesting looking images) but we're interested in seeing the variability in the whole distribution, so we choose to sample instead.

Could you provide alternative line of code that Lucas2012 described? I'd like to compare

Adding something like logits *= 10000. after line 868 should give that behavior. (Softmax with a very low "temperature" is equivalent to argmax)

Ok thanks. I'll try that