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

bug in reinforce with baseline #37

Open
hlhang9527 opened this issue Mar 21, 2022 · 2 comments
Open

bug in reinforce with baseline #37

hlhang9527 opened this issue Mar 21, 2022 · 2 comments

Comments

@hlhang9527
Copy link

the update value network should be:

    alpha_w = 1e-3  # 初始化

    optimizer_w = optim.Adam(**s_value_func**.parameters(), lr=alpha_w)
    optimizer_w.zero_grad()
    policy_loss_w =-delta
    policy_loss_w.backward(retain_graph = True)
    clip_grad_norm_(policy_loss_w, 0.1)
    optimizer_w.step()
@stvsd1314
Copy link

There's some error in this code. when run this code,it shows some error about compute graph. do you meet the same problem?

@hlhang9527
Copy link
Author

same problem here, you can debug it step by step to see the errors

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

2 participants