question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

L2 weight decay for Q

See original GitHub issue

The paper mentions “For Q we included L2 weight decay of 0.01 and used a discount factor of gamma = 0.99”

Does that mean that we need to add L2 regularisation to each layer in the critic network?

Maybe something like this in create_critic_network

net = tflearn.add_weights_regularizer(net, 'L2', weight_decay=0.01)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Anjum48commented, Mar 25, 2017

Cool - thanks! I think I’ve got it to work now for my example (non-pendulum). For your code just add this at line 177 in ddpg.py

self.L2 = np.sum([tf.nn.l2_loss(v) for v in self.network_params if "W" in v.name])
self.loss = tflearn.mean_square(self.predicted_q_value, self.out) + L2_DECAY * self.L2
0reactions
AlEmerichcommented, Aug 29, 2018

Hi (Sorry for my bad manners 😃 ) and thank you for the precision !

Read more comments on GitHub >

github_iconTop Results From Across the Web

Weight Decay == L2 Regularization? | by Divyanshu Mishra
In this post, we mainly focus on L2 Regularization and argue whether we can refer L2 regularization and weight decay as two faces...
Read more >
Deep learning basics — weight decay | Analytics Vidhya
Weight decay is a regularization technique by adding a small penalty, usually the L2 norm of the weights (all the weights of the...
Read more >
STABLE WEIGHT DECAY REGULARIZATION - OpenReview
First, the L2 regularization is unstable weight decay for all optimizers that use Momentum, such as stochastic gradient descent (SGD).
Read more >
Difference between neural net weight decay and learning rate
The learning rate is a parameter that determines how much an updating step influences the current value of the weights. While weight decay...
Read more >
3.7. Weight Decay - Dive into Deep Learning
More commonly called ℓ 2 regularization outside of deep learning circles when optimized by minibatch stochastic gradient descent, weight decay might be the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found