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

Question on reward computation #5

Open
NagisaZj opened this issue Mar 12, 2024 · 0 comments
Open

Question on reward computation #5

NagisaZj opened this issue Mar 12, 2024 · 0 comments

Comments

@NagisaZj
Copy link

NagisaZj commented Mar 12, 2024

Hi, thank you for releasing the code.

I have a problem on the computation of the reward. In the compute_reward function in videogpt_reward_model.py, for each transition $(s_t,a_t,s_{t+1})$, it seems that the variables image_batch, encodings, and embeddings correspond to $s_t$. Then it seems the reward $r_t(s_t,a_t)$ is computed as $log p({s_t|s_{1:t-1}})$ (when reward_model_compute_joint is set to False) and the sum from $log p({s_t|s_{1:t-1}})$ to $log p({s_{t-seqlen+1}|s_{1:t-seqlen}})$ (when reward_model_compute_joint is set to True), instead of the $log p(s_{t+1}|s_{1:t})$ stated in the paper. Do I miss any details that fix this issue, or is this exactly the empirical implementation of VIPER? Thank you!

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

1 participant