Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CDF function and model p #26

Open
june1819 opened this issue Oct 27, 2020 · 3 comments
Open

CDF function and model p #26

june1819 opened this issue Oct 27, 2020 · 3 comments

Comments

@june1819
Copy link

  1. In picture of paper, the picture shows that encode z(s) with model p(z(s) | f(s+1)) . In encoding details, it says encode each channel c of z(s) with C(z(s) | f(s+1)). Why?
  2. What is the relationship between CDF function and model p?
@CaiShilv
Copy link

I also have doubts about this. How to ensure that the CDF is an incremental function in encode? In the process of running forward on pytorch1.7, I found that the CDF function obtained from some images is not incremental, leading to wrong coding.

@fab-jul
Copy link
Owner

fab-jul commented Jan 18, 2021

@june1819

  1. We encode with the CDF, and we encode channel per channel. The CDF and PDF are calculatable from each other, and in the paper we use the simpler notation (with p). The fact that we use a CDF for arithmetic coding is because it allows fast lookups of intervals (needed for arithmetic coding).
  2. CDF is the integrated p.

@KuaidiYuan The CDF obtained by the model is not always incremental, correct. That's why we have _renorm_cast_cdf_(cdf, precision). For some more details on this, see the torchac README. This should work on all images. Can you share the image that led to wrong encoding?

@CaiShilv
Copy link

CaiShilv commented Jan 19, 2021

@fab-jul
click
I put image and the weight of training here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants