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

KeyError: 'qarv_base' #21

Open
SingSongbjtu opened this issue Sep 9, 2024 · 4 comments
Open

KeyError: 'qarv_base' #21

SingSongbjtu opened this issue Sep 9, 2024 · 4 comments

Comments

@SingSongbjtu
Copy link

SingSongbjtu commented Sep 9, 2024

Excuse me! Have you ever met the problem of KeyError: 'qarv_base', either training or evaluating(train-var-rate.py or eval-var-rate.py)? Could you please help solve the error?
image

@ruth-jh
Copy link

ruth-jh commented Oct 12, 2024

Have you solve this problem?I have the same question.

@duanzhiihao
Copy link
Owner

Hi, I'm trying to reproduce the problem, but the code works fine on my end.
Can you share your system information and Python version?

@SingSongbjtu
Copy link
Author

Thank you for your reply! I add import lvae.models.qarv.zoo in eval-var-rate.py to run, it seems work. But after that I haven't added import lvae.models.qarv.zoo in train-var-rate.py, it still works well. My python version is 3.9.0, the attachment below is all my configuration.
I have another question hoping to be solve. In the code'plogv = tnf.softplus(plogv + 2.3) - 2.3 # make logscale > -2.3', softplus already makes plogv non-negative since softplus(x)=log(1+exp(x)), why you add another term 2.3 and then minus that? And why you choose the number to be 2.3, can it be an arbitrary number like 5 or 50?
myQARV.txt
image

@duanzhiihao
Copy link
Owner

I have another question hoping to be solve. In the code'plogv = tnf.softplus(plogv + 2.3) - 2.3 # make logscale > -2.3', softplus already makes plogv non-negative since softplus(x)=log(1+exp(x)), why you add another term 2.3 and then minus that? And why you choose the number to be 2.3, can it be an arbitrary number like 5 or 50?

The objective is to make scale (i.e., pv) > 0.1, which approximately matches CompressAI. We don't want the scale to be too small, because that causes unstable straining.
We achieve this by first doing plogv = tnf.softplus(plogv + 2.3) - 2.3 to let plogv > -2.3. Since pv = torch.exp(plogv), pv must > 0.1. Note that exp(-2.3) ≈ 0.1.

A much simpler way to achieve this can be pv = plogv.exp() + 0.1. We will probably switch to this simpler way in a future release.

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