WeightDecay

struct defined in module Flux.Optimise


			WeightDecay(λ = 0)

Decay weights by λ. Typically composed with other optimisers as the first transformation to the gradient, making it equivalent to adding L_2 regularization with coefficient λ to the loss.

Examples


			
			
			
			opt
			 
			=
			 
			

	
			Optimiser
			(
			

			WeightDecay
			(
			1f-4
			)
			,
			 
			

	
			Adam
			(
			)
			)
Methods

There are 2 methods for Flux.Optimise.WeightDecay: