MaxNorm

public class MaxNorm

Constrains the weights incident to each hidden unit to have a norm less than or equal to a desired value.

Constants

int AXIS_DEFAULT
double MAX_VALUE_DEFAULT

Inherited Constants

Public Constructors

MaxNorm(Ops tf)
Create a MaxNorm constraint using MAX_VALUE_DEFAULT for the max value and AXIS_DEFAULT for the axis.
MaxNorm(Ops tf, double maxValue)
Create a MaxNorm constraint using AXIS_DEFAULT for the axis.
MaxNorm(Ops tf, double maxValue, int axis)
Create a MaxNorm constraint
MaxNorm(Ops tf, double maxValue, int[] axes)
Create a MaxNorm constraint

Public Methods

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

Inherited Methods

Constants

public static final int AXIS_DEFAULT

Constant Value: 0

public static final double MAX_VALUE_DEFAULT

Constant Value: 2.0

Public Constructors

public MaxNorm (Ops tf)

Create a MaxNorm constraint using MAX_VALUE_DEFAULT for the max value and AXIS_DEFAULT for the axis.

Parameters
tf the TensorFlow Ops

public MaxNorm (Ops tf, double maxValue)

Create a MaxNorm constraint using AXIS_DEFAULT for the axis.

Parameters
tf the TensorFlow Ops
maxValue the maximum norm for the incoming weights.

public MaxNorm (Ops tf, double maxValue, int axis)

Create a MaxNorm constraint

Parameters
tf the TensorFlow Ops
maxValue the maximum norm for the incoming weights.
axis axis along which to calculate weight norms.

public MaxNorm (Ops tf, double maxValue, int[] axes)

Create a MaxNorm constraint

Parameters
tf the TensorFlow Ops
maxValue the maximum norm for the incoming weights.
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

public double getMaxValue ()

Gets the max value

Returns
  • the maxValue