Skip to content

Easiest was to add regularization (weight decay) to loss? #769

Answered by zachgk
hmf asked this question in Q&A
Discussion options

You must be logged in to vote

That's exactly how I would go about it. I might even have the l1Penalty take an NDList so it can sum the penalties across multiple weights.

This seems like a really good improvement. Would you be interested in adding a PR to DJL with your weight penalty loss?

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@hmf
Comment options

@zachgk
Comment options

Answer selected by hmf
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants