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 is grad_norms in AC_Network? #29

Closed
yrlu opened this issue Apr 6, 2017 · 2 comments
Closed

What is grad_norms in AC_Network? #29

yrlu opened this issue Apr 6, 2017 · 2 comments

Comments

@yrlu
Copy link

yrlu commented Apr 6, 2017

Hi,

I come across your A3C implementation and find the following 2 lines in AC_network.py:

self.var_norms = tf.global_norm(local_vars)
grads,self.grad_norms = tf.clip_by_global_norm(self.gradients,40.0)

I wonder what's grad_norms for? It seems to me that it is not used.

Thanks!

@IbrahimSobh
Copy link

This is the norm value of gradients of the network, by monitoring this value, we know how much changes are applied to the network parameters during training

In case of gradient explosion, we usually use a simple trick, namely gradient clipping, to prevent too huge changes to the network parameters.

In the case above, 40.0 is used for clipping

Try to use different values (10, 20, 50, 80) and see the effect on the training and share the results if you like :)

@yrlu
Copy link
Author

yrlu commented Apr 8, 2017

Thanks @IbrahimSobh , it helps!

@yrlu yrlu closed this as completed Apr 8, 2017
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