View source on GitHub |
MaxNorm weight constraint.
Inherits From: Constraint
tf.keras.constraints.MaxNorm(
max_value=2, axis=0
)
Constrains the weights incident to each hidden unit to have a norm less than or equal to a desired value.
Also available via the shortcut function tf.keras.constraints.max_norm
.
Methods
from_config
@classmethod
from_config( config )
Instantiates a weight constraint from a configuration dictionary.
Example:
constraint = UnitNorm()
config = constraint.get_config()
constraint = UnitNorm.from_config(config)
Args | |
---|---|
config
|
A Python dictionary, the output of get_config .
|
Returns | |
---|---|
A tf.keras.constraints.Constraint instance.
|