getL2Factor
Get L2 regularization factor of layer learnable parameter
Syntax
Description
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 layer is a networkLayer or 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(net,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(net,parameterPath)parameterPath. Use
this syntax when the parameter is in a networkLayer or when the parameter is in a
dlnetwork object in a custom layer.