tfl.kronecker_factored_lattice_lib.verify_hyperparameters
Stay organized with collections
Save and categorize content based on your preferences.
Verifies that all given hyperparameters are consistent.
tfl.kronecker_factored_lattice_lib.verify_hyperparameters(
lattice_sizes=None,
units=None,
num_terms=None,
input_shape=None,
monotonicities=None,
output_min=None,
output_max=None
)
This function does not inspect weights themselves. Only their shape. Use
assert_constraints()
to assert actual weights against constraints.
See tfl.layers.KroneckerFactoredLattice
class level comment for detailed
description of arguments.
Args |
lattice_sizes
|
Lattice size to check against.
|
units
|
Units hyperparameter of KroneckerFactoredLattice layer.
|
num_terms
|
Number of independently trained submodels hyperparameter of
KroneckerFactoredLattice layer.
|
input_shape
|
Shape of layer input. Useful only if units and/or
monotonicities is set.
|
monotonicities
|
Monotonicities hyperparameter of KroneckerFactoredLattice
layer. Useful only if input_shape is set.
|
output_min
|
Minimum output of KroneckerFactoredLattice layer.
|
output_max
|
Maximum output of KroneckerFactoredLattice layer.
|
Raises |
ValueError
|
If lattice_sizes < 2.
|
ValueError
|
If units < 1.
|
ValueError
|
If num_terms < 1.
|
ValueError
|
If len(monotonicities) does not match number of inputs.
|
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.kronecker_factored_lattice_lib.verify_hyperparameters\n\n\u003cbr /\u003e\n\n|--------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/lattice/blob/v2.1.1/tensorflow_lattice/python/kronecker_factored_lattice_lib.py#L472-L549) |\n\nVerifies that all given hyperparameters are consistent. \n\n tfl.kronecker_factored_lattice_lib.verify_hyperparameters(\n lattice_sizes=None,\n units=None,\n num_terms=None,\n input_shape=None,\n monotonicities=None,\n output_min=None,\n output_max=None\n )\n\nThis function does not inspect weights themselves. Only their shape. Use\n`assert_constraints()` to assert actual weights against constraints.\n\nSee [`tfl.layers.KroneckerFactoredLattice`](../../tfl/layers/KroneckerFactoredLattice) class level comment for detailed\ndescription of arguments.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|------------------|---------------------------------------------------------------------------------------------------------|\n| `lattice_sizes` | Lattice size to check against. |\n| `units` | Units hyperparameter of `KroneckerFactoredLattice` layer. |\n| `num_terms` | Number of independently trained submodels hyperparameter of `KroneckerFactoredLattice` layer. |\n| `input_shape` | Shape of layer input. Useful only if `units` and/or `monotonicities` is set. |\n| `monotonicities` | Monotonicities hyperparameter of `KroneckerFactoredLattice` layer. Useful only if `input_shape` is set. |\n| `output_min` | Minimum output of `KroneckerFactoredLattice` layer. |\n| `output_max` | Maximum output of `KroneckerFactoredLattice` layer. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ------ ||\n|--------------|---------------------------------------------------------|\n| `ValueError` | If lattice_sizes \\\u003c 2. |\n| `ValueError` | If units \\\u003c 1. |\n| `ValueError` | If num_terms \\\u003c 1. |\n| `ValueError` | If len(monotonicities) does not match number of inputs. |\n\n\u003cbr /\u003e"]]