Set L2 regularization factor of layer learnable parameter
sets the L2 regularization factor of the parameter with the name
layer
= setL2Factor(layer
,parameterName
,factor
)parameterName
in layer
to
factor
.
For built-in layers, you can set the L2 regularization factor directly by
using the corresponding property. For example, for a
convolution2dLayer
layer, the syntax layer =
setL2Factor(layer,'Weights',factor)
is equivalent to
layer.WeightL2Factor = factor
.
sets the L2 regularization factor of the parameter specified by the path
layerUpdated
= setL2Factor(layer
,parameterPath
,factor
)parameterPath
. Use this syntax when the parameter is in
a dlnetwork
object in a custom layer.
sets the L2 regularization factor of the parameter with the name
dlnetUpdated
= setL2Factor(dlnet
,layerName
,parameterName
,factor
)parameterName
in the layer with name
layerName
for the specified dlnetwork
object.
sets the L2 regularization factor of the parameter specified by the path
dlnetUpdated
= setL2Factor(dlnet
,parameterPath
,factor
)parameterPath
. Use this syntax when the parameter is in
a nested layer.
getL2Factor
| getLearnRateFactor
| setLearnRateFactor
| trainingOptions
| trainNetwork