Class NonNeg

All Implemented Interfaces:
Constraint

public class NonNeg extends AbstractConstraint
Constrains the weights to be non-negative.
  • Constructor Details

    • NonNeg

      public NonNeg()
      Create a NonNeg constraint
  • Method Details

    • call

      public <T extends TNumber> Operand<T> call(Ops tf, Operand<T> weights)
      Applies the constraint against the provided weights
      Type Parameters:
      T - the data type for weights and results.
      Parameters:
      tf - the TensorFlow Ops
      weights - the weights
      Returns:
      the constrained weights