tfl.test_utils.get_linear_lattice_interpolation_fn
Stay organized with collections
Save and categorize content based on your preferences.
Returns function which does lattice interpolation.
tfl.test_utils.get_linear_lattice_interpolation_fn(
lattice_sizes, monotonicities, output_min, output_max
)
Returned function matches lattice_layer.LinearInitializer with corresponding
parameters.
Args |
lattice_sizes
|
list or tuple of integers which represents lattice sizes.
|
monotonicities
|
monotonicity constraints.
|
output_min
|
minimum output of linear function.
|
output_max
|
maximum output of linear function.
|
Returns |
Function which takes d-dimension point and performs lattice interpolation
assuming lattice weights are such that lattice represents linear function
with given output_min and output_max. All monotonic dimesions of this linear
function cotribute with same weight despite of numer of vertices per
dimension. All non monotonic dimensions have weight 0.0.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-02 UTC.
[null,null,["Last updated 2024-08-02 UTC."],[],[],null,["# tfl.test_utils.get_linear_lattice_interpolation_fn\n\n\u003cbr /\u003e\n\n|------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/lattice/blob/v2.1.1/tensorflow_lattice/python/test_utils.py#L224-L261) |\n\nReturns function which does lattice interpolation. \n\n tfl.test_utils.get_linear_lattice_interpolation_fn(\n lattice_sizes, monotonicities, output_min, output_max\n )\n\nReturned function matches lattice_layer.LinearInitializer with corresponding\nparameters.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|------------------|-----------------------------------------------------------|\n| `lattice_sizes` | list or tuple of integers which represents lattice sizes. |\n| `monotonicities` | monotonicity constraints. |\n| `output_min` | minimum output of linear function. |\n| `output_max` | maximum output of linear function. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| Function which takes d-dimension point and performs lattice interpolation assuming lattice weights are such that lattice represents linear function with given output_min and output_max. All monotonic dimesions of this linear function cotribute with same weight despite of numer of vertices per dimension. All non monotonic dimensions have weight 0.0. ||\n\n\u003cbr /\u003e"]]