tfl.kronecker_factored_lattice_layer.KFLRandomMonotonicInitializer
Stay organized with collections
Save and categorize content based on your preferences.
Initializes a tfl.layers.KroneckerFactoredLattice
as random monotonic.
tfl.kronecker_factored_lattice_layer.KFLRandomMonotonicInitializer(
monotonicities, init_min=0.5, init_max=1.5, seed=None
)
Args |
monotonicities
|
Monotonic dimensions for initialization. Does not need to
match monotonicities of tfl.layers.KroneckerFactoredLattice .
|
init_min
|
The lower bound on the range of initialized weights.
|
init_max
|
The upper bound on the range of initialized weights.
|
seed
|
A Python integer. Used to create a random seed for the distribution.
|
Methods
from_config
@classmethod
from_config(
config
)
Instantiates an initializer from a configuration dictionary.
Example:
initializer = RandomUniform(-1, 1)
config = initializer.get_config()
initializer = RandomUniform.from_config(config)
Args |
config
|
A Python dictionary, the output of get_config() .
|
Returns |
An Initializer instance.
|
get_config
View source
get_config()
Standard Keras config for serializaion.
__call__
View source
__call__(
shape, scale, dtype=None, **kwargs
)
Returns weights of tfl.layers.KroneckerFactoredLattice
layer.
Args |
shape
|
Must be: (1, lattice_sizes, units * dims, num_terms) .
|
scale
|
Scale variable of shape: (units, num_terms) .
|
dtype
|
Standard Keras initializer param.
|
**kwargs
|
Other args passed to keras.initializers.Initializer call
method.
|
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."],[],[]]