Unit norm constraint
This card is a wrapper of this Keras class.
Note: the backend for building and training neural networks is based on Keras. The documentation of this card is a variant of the documentation of its corresponding class.
Inputs
-
Axes — List of Integer
Axis along which to calculate weight norms. For instance, in a Dense layer the weight matrix has shape (
input_dim
,output_dim
), set Axes to “0” to constrain each weight vector of length (input_dim
,). In a Convolution 2D layer with Data format = “Channels last”, the weight tensor has shape (rows
,cols
,input_depth
,output_depth
), set Axes to “0, 1, 2” to constrain the weights of each filter tensor of size (rows
,cols
,input_depth
).
Outputs
-
Constraint instance — NeuralNetworkConstraint
Instance of the constraint.