Class UnitNorm
Constrains the weights incident to each hidden unit to have unit norm.
Namespace: SiaNet.Constraints
Assembly: SiaNet.dll
Syntax
public class UnitNorm : BaseConstraint
Constructors
| Improve this Doc View SourceUnitNorm(Int32)
Initializes a new instance of the UnitNorm class.
Declaration
public UnitNorm(int axis = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | axis | Integer, axis along which to calculate weight norms |
Fields
| Improve this Doc View SourceAxis
Integer, axis along which to calculate weight norms. For instance, in a Dense layer the weight matrix has shape (input_dim, output_dim), set axis to 0 to constrain each weight vector of length (input_dim,). In a Conv2D layer, the weight tensor has shape (output_depth, input_depth, rows, cols), set axis to [1, 2, 3] to constrain the weights of each filter tensor of size (input_depth, rows, cols).
Declaration
public int Axis
Field Value
Type | Description |
---|---|
System.Int32 | The axis. |