tfl.kronecker_factored_lattice_layer.ScaleConstraints
Stay organized with collections
Save and categorize content based on your preferences.
Constraints for tfl.layers.KroneckerFactoredLattice
scale.
tfl.kronecker_factored_lattice_layer.ScaleConstraints(
output_min=None, output_max=None
)
Constraints the scale variable to be between
[output_min-output_max, output_max-output_min]
such that the final output
of the layer is within the desired [output_min, output_max]
range, assuming
bias is properly fixed to be output_min
.
Args |
output_min
|
Same meaning as corresponding parameter of
KroneckerFactoredLattice .
|
output_max
|
Same meaning as corresponding parameter of
KroneckerFactoredLattice .
|
Methods
from_config
@classmethod
from_config(
config
)
Instantiates a weight constraint from a configuration dictionary.
Example:
constraint = UnitNorm()
config = constraint.get_config()
constraint = UnitNorm.from_config(config)
Args |
config
|
A Python dictionary, the output of get_config .
|
get_config
View source
get_config()
Standard Keras config for serialization.
__call__
View source
__call__(
scale
)
Applies constraints to scale
.
Args |
scale
|
Kronecker-Factored Lattice scale tensor of shape: (units,
num_terms) .
|
Returns |
Constrained and clipped scale.
|
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."],[],[]]