UnitNorm

public class UnitNorm

Constrains the weights to have unit norm.

Constants

int AXIS_DEFAULT

Inherited Constants

Public Constructors

UnitNorm(Ops tf)
Create a UnitNorm Constraint with the axis set to AXIS_DEFAULT
UnitNorm(Ops tf, int axis)
Create a UnitNorm Constraint
UnitNorm(Ops tf, int[] axes)
Create a UnitNorm Constraint

Public Methods

<T extends TNumber> Operand<T>
call(Operand<T> weights)
Applies the constraint against the provided weights
int[]
getAxes()
Gets the axes

Inherited Methods

Constants

public static final int AXIS_DEFAULT

Constant Value: 0

Public Constructors

public UnitNorm (Ops tf)

Create a UnitNorm Constraint with the axis set to AXIS_DEFAULT

Parameters
tf the TensorFlow Ops

public UnitNorm (Ops tf, int axis)

Create a UnitNorm Constraint

Parameters
tf the TensorFlow Ops
axis axis along which to calculate weight norms.

public UnitNorm (Ops tf, int[] axes)

Create a UnitNorm Constraint

Parameters
tf the TensorFlow Ops
axes axes along which to calculate weight norms.

Public Methods

public Operand<T> call (Operand<T> weights)

Applies the constraint against the provided weights

Parameters
weights the weights
Returns
  • the constrained weights

public int[] getAxes ()

Gets the axes

Returns
  • the axes