Versatile-Image-Compression icon indicating copy to clipboard operation
Versatile-Image-Compression copied to clipboard

ce_loss calculate code

Open JintaoLee-Roger opened this issue 2 years ago • 0 comments

Hi, it's a nice work! Your code is easy to understand, however, I still have some questions.

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

  2. Why divide the total ce_loss by 256? return ce_loss / 256

  3. 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).

  4. Can you share your compress and decompress code?

Look forward to your reply, and I would appreciate it very much.

JintaoLee-Roger avatar Aug 09 '22 07:08 JintaoLee-Roger