tfl.kronecker_factored_lattice_layer.create_kernel_initializer
Stay organized with collections
Save and categorize content based on your preferences.
Returns a kernel Keras initializer object from its id.
tfl.kronecker_factored_lattice_layer.create_kernel_initializer(
kernel_initializer_id,
monotonicities,
output_min,
output_max,
init_min=None,
init_max=None
)
This function is used to convert the 'kernel_initializer' parameter in the
constructor of tfl.layers.KroneckerFactoredLattice into the corresponding
initializer object.
Args |
kernel_initializer_id
|
See the documentation of the 'kernel_initializer'
parameter in the constructor of tfl.layers.KroneckerFactoredLattice .
|
monotonicities
|
See the documentation of the same parameter in the
constructor of tfl.layers.KroneckerFactoredLattice .
|
output_min
|
See the documentation of the same parameter in the constructor
of tfl.layers.KroneckerFactoredLattice .
|
output_max
|
See the documentation of the same parameter in the constructor
of tfl.layers.KroneckerFactoredLattice .
|
init_min
|
None or lower bound of kernel initialization. If set, init_max
must also be set. Ignored if kernel_initializer_id is a Keras object.
|
init_max
|
None or upper bound of kernel initialization. If set, init_min
must also be set. Ignored if kernel_initializer_id is a Keras object.
|
Raises |
ValueError
|
If only one of init_{min/max} is set.
|
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-02 UTC."],[],[],null,["# tfl.kronecker_factored_lattice_layer.create_kernel_initializer\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_layer.py#L362-L415) |\n\nReturns a kernel Keras initializer object from its id. \n\n tfl.kronecker_factored_lattice_layer.create_kernel_initializer(\n kernel_initializer_id,\n monotonicities,\n output_min,\n output_max,\n init_min=None,\n init_max=None\n )\n\nThis function is used to convert the 'kernel_initializer' parameter in the\nconstructor of tfl.layers.KroneckerFactoredLattice into the corresponding\ninitializer object.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|-------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `kernel_initializer_id` | See the documentation of the 'kernel_initializer' parameter in the constructor of [`tfl.layers.KroneckerFactoredLattice`](../../tfl/layers/KroneckerFactoredLattice). |\n| `monotonicities` | See the documentation of the same parameter in the constructor of [`tfl.layers.KroneckerFactoredLattice`](../../tfl/layers/KroneckerFactoredLattice). |\n| `output_min` | See the documentation of the same parameter in the constructor of [`tfl.layers.KroneckerFactoredLattice`](../../tfl/layers/KroneckerFactoredLattice). |\n| `output_max` | See the documentation of the same parameter in the constructor of [`tfl.layers.KroneckerFactoredLattice`](../../tfl/layers/KroneckerFactoredLattice). |\n| `init_min` | None or lower bound of kernel initialization. If set, init_max must also be set. Ignored if kernel_initializer_id is a Keras object. |\n| `init_max` | None or upper bound of kernel initialization. If set, init_min must also be set. Ignored if kernel_initializer_id is a Keras object. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| The Keras initializer object for the [`tfl.layers.KroneckerFactoredLattice`](../../tfl/layers/KroneckerFactoredLattice) kernel variable. ||\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ------ ||\n|--------------|---------------------------------------|\n| `ValueError` | If only one of init_{min/max} is set. |\n\n\u003cbr /\u003e"]]