MinMaxNorm

public class MinMaxNorm

Constrains the weights to have the norm between a lower bound and an upper bound.

Constants

int AXIS_DEFAULT
double MAX_VALUE_DEFAULT
double MIN_VALUE_DEFAULT
double RATE_DEFAULT

Inherited Constants

Public Constructors

MinMaxNorm(Ops tf)
Create a MinMaxNorm constraint using MIN_VALUE_DEFAULT for the min value, MAX_VALUE_DEFAULT for the max value, RATE_DEFAULT for the rate and AXIS_DEFAULT for the axis
MinMaxNorm(Ops tf, double minValue, double maxValue)
Create a MinMaxNorm constraint using RATE_DEFAULT for the rate and AXIS_DEFAULT for the axis
MinMaxNorm(Ops tf, double minValue, double maxValue, double rate, int axis)
Create a MinMaxNorm constraint
MinMaxNorm(Ops tf, double minValue, double maxValue, double rate, int[] axes)
Create a MinMaxNorm 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 maxValue
double
getMinValue()
Gets the minValue
double
getRate()
Gets the rate

Inherited Methods

Constants

public static final int AXIS_DEFAULT

Constant Value: 0

public static final double MAX_VALUE_DEFAULT

Constant Value: 1.0

public static final double MIN_VALUE_DEFAULT

Constant Value: 0.0

public static final double RATE_DEFAULT

Constant Value: 1.0

Public Constructors

public MinMaxNorm (Ops tf)

Create a MinMaxNorm constraint using MIN_VALUE_DEFAULT for the min value, MAX_VALUE_DEFAULT for the max value, RATE_DEFAULT for the rate and AXIS_DEFAULT for the axis

Parameters
tf the TensorFlow Ops

public MinMaxNorm (Ops tf, double minValue, double maxValue)

Create a MinMaxNorm constraint using RATE_DEFAULT for the rate and AXIS_DEFAULT for the axis

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

public MinMaxNorm (Ops tf, double minValue, double maxValue, double rate, int axis)

Create a MinMaxNorm constraint

Parameters
tf the TensorFlow Ops
minValue the minimum norm for the incoming weights.
maxValue the maximum norm for the incoming weights.
rate the rate for enforcing the constraint.
axis integer, axis along which to calculate weight norms.

public MinMaxNorm (Ops tf, double minValue, double maxValue, double rate, int[] axes)

Create a MinMaxNorm constraint

Parameters
tf the TensorFlow Ops
minValue the minimum norm for the incoming weights.
maxValue the maximum norm for the incoming weights.
rate the rate for enforcing the constraint.
axes integer, axis 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 maxValue

Returns
  • the maxValue

public double getMinValue ()

Gets the minValue

Returns
  • the minValue

public double getRate ()

Gets the rate

Returns
  • the rate