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

What's the difference between the synthetic/crl/energy and synthetic/crl/envelope #24

Open
JQuan1999 opened this issue Jun 28, 2022 · 0 comments

Comments

@JQuan1999
Copy link

JQuan1999 commented Jun 28, 2022

Sorry, I have a problem why don't directly output HQ in the synthetic/crl/envelope/meta.py learn(),

__, Q = self.model_(Variable(torch.cat(state_batch, dim=0)),
                                Variable(w_batch), w_num=self.weight_num)
# detach since we don't want gradients to propagate
# HQ, _    = self.model_(Variable(torch.cat(next_state_batch, dim=0), volatile=True),
# 					  Variable(w_batch, volatile=True), w_num=self.weight_num)
 _, DQ = self.model(Variable(torch.cat(next_state_batch, dim=0), requires_grad=False),
                               Variable(w_batch, requires_grad=False))

but in the synthetic/crl/energy/meta.py learn()

__, Q = self.model(Variable(torch.cat(state_batch, dim=0)),
                               Variable(preference_batch), w_num=self.weight_num)
 # detach since we don't want gradients to propagate
HQ, _ = self.model(Variable(torch.cat(next_state_batch, dim=0)),
                               Variable(preference_batch), w_num=self.weight_num)

Why getting HQ takes two different approaches and what is the difference between them

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