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

Loss of A2C algorithm #21

Closed
yingchengyang opened this issue Apr 6, 2020 · 2 comments
Closed

Loss of A2C algorithm #21

yingchengyang opened this issue Apr 6, 2020 · 2 comments
Labels
question Further information is requested

Comments

@yingchengyang
Copy link
Contributor

I'd like to ask about the loss of a2c algorithm. There are three part of loss in tianshou's code:
loss = a_loss + self._w_vf * vf_loss - self._w_ent * ent_loss
I'd like to ask about the meaning of the third part of the loss. I try use this to run in CartPole-v0, it converge after 1355 steps,then I try use only the first and second part of loss to run in CartPole-v0, it converge after 770 steps. It seems that only use the first and second part of loss is enough?

@Trinkle23897
Copy link
Collaborator

The third loss is about the policy entropy loss. In other repo such as openai baseline, their A2C/A3C implementation has this term, so I add the entropy loss here.
Of course you can set the weight of entropy loss to zero :)

@yingchengyang
Copy link
Contributor Author

thanks!

Trinkle23897 added a commit that referenced this issue Apr 6, 2020
@Trinkle23897 Trinkle23897 added the question Further information is requested label May 5, 2020
BFAnas pushed a commit to BFAnas/tianshou that referenced this issue May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
No open projects
Development

No branches or pull requests

2 participants