tfl.pwl_calibration_layer.NaiveBoundsConstraints

View source on GitHub

Class NaiveBoundsConstraints

Naively clips all elements of tensor to be within bounds.

This constraint is used only for the weight tensor for missing output value.

Attributes:

  • All __init__ arguments.

__init__

View source

__init__(
    lower_bound=None,
    upper_bound=None
)

Initializes an instance of NaiveBoundsConstraints.

Args:

  • lower_bound: Lower bound to clip variable values to.
  • upper_bound: Upper bound to clip variable values to.

Methods

__call__

View source

__call__(w)

Applies constraints to w.

get_config

View source

get_config()

Standard Keras config for serialization.