Computes weights for PWL calibration.
tfl.pwl_calibration_lib.compute_interpolation_weights(
inputs, keypoints, lengths
)
Args |
inputs
|
Tensor of shape: (batch_size, 1) , (batch_size, units, 1) or
(batch_size, 1, 1) . For multi-unit calibration, broadcasting will be used
if needed.
|
keypoints
|
Tensor of shape (num_keypoints-1) or (units, num_keypoints-1)
which represents left keypoint of pieces of piecewise linear function
along X axis.
|
lengths
|
Tensor of shape (num_keypoints-1) or (units, num_keypoints-1)
which represents lengths of pieces of piecewise linear function along X
axis.
|
Returns |
Interpolation weights tensor of shape: (batch_size, num_keypoints) or
(batch_size, units, num_keypoints) .
|