tfl.pwl_calibration_layer.NaiveBoundsConstraints

Naively clips all elements of tensor to be within bounds.

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

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

Methods

from_config

Instantiates a weight constraint from a configuration dictionary.

Example:

constraint = UnitNorm()
config = constraint.get_config()
constraint = UnitNorm.from_config(config)

Args
config A Python dictionary, the output of get_config.

Returns
A tf.keras.constraints.Constraint instance.

get_config

View source

Standard Keras config for serialization.

__call__

View source

Applies constraints to w.