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