Initializes PWL calibration layer to represent linear function.
tfl.pwl_calibration_layer.UniformOutputInitializer(
output_min, output_max, monotonicity, keypoints=None
)
PWL calibration layer weights are one-d tensor. First element of tensor represents bias. All remaining represent delta in y-value compare to previous point. Aka heights of segments.
Methods
from_config
@classmethod
from_config( config )
Instantiates an initializer from a configuration dictionary.
Example:
initializer = RandomUniform(-1, 1)
config = initializer.get_config()
initializer = RandomUniform.from_config(config)
Args | |
---|---|
config
|
A Python dictionary, the output of get_config() .
|
Returns | |
---|---|
An Initializer instance.
|
get_config
get_config()
Standard Keras config for serialization.
__call__
__call__(
shape, dtype=None, partition_info=None
)
Returns weights of PWL calibration layer.
Args | |
---|---|
shape
|
Must be a collection of the form (k, units) where k >= 2 .
|
dtype
|
Standard Keras initializer param. |
partition_info
|
Standard Keras initializer param. |
Returns | |
---|---|
Weights of PWL calibration layer. |
Raises | |
---|---|
ValueError
|
If requested shape is invalid for PWL calibration layer weights. |