Hi, it's a nice work! Your code is easy to understand, however, I still have some questions.
In entropy_codec.py file. What is the function of variable c? Why multiply each ce_loss loss by c?
c = tf.pow(tf.pow(2, (4-4-i)), 2)
Why divide the total ce_loss by 256?
return ce_loss / 256
In pixelcnn_2D.py and pixelcnn_2D_context.py files, the cross_entropy is calculate with
cross_entropy = -tf.reduce_mean(tf.log(prob)).
There seems to be something wrong, becuase tf.log(x) means ln(x), not log_2(x).
Can you share your compress and decompress code?
Look forward to your reply, and I would appreciate it very much.
Hi, it's a nice work! Your code is easy to understand, however, I still have some questions.
In entropy_codec.py file. What is the function of variable c? Why multiply each ce_loss loss by c?
c = tf.pow(tf.pow(2, (4-4-i)), 2)
Why divide the total ce_loss by 256?
return ce_loss / 256
In
pixelcnn_2D.py
andpixelcnn_2D_context.py
files, the cross_entropy is calculate withcross_entropy = -tf.reduce_mean(tf.log(prob))
. There seems to be something wrong, becuasetf.log(x)
meansln(x)
, notlog_2(x)
.Can you share your compress and decompress code?
Look forward to your reply, and I would appreciate it very much.