tfl.kronecker_factored_lattice_lib.kfl_random_monotonic_initializer
Stay organized with collections
Save and categorize content based on your preferences.
Returns a uniformly random sampled monotonic weight tensor.
tfl.kronecker_factored_lattice_lib.kfl_random_monotonic_initializer(
shape,
scale,
monotonicities,
init_min=0.5,
init_max=1.5,
dtype=tf.float32,
seed=None
)
- The uniform random monotonic function will initilaize the lattice parameters
uniformly at random and make it such that the parameters are monotonically
increasing for each input.
- The random parameters will be sampled from
[init_min, init_max]
Args |
shape
|
Shape of weights to initialize. Must be: (1, lattice_sizes, units *
dims, num_terms) .
|
scale
|
Scale variable of shape: (units, num_terms) .
|
monotonicities
|
None or list or tuple of length dims of elements of {0,1}
which represents monotonicity constraints per dimension. 1 stands for
increasing (non-decreasing in fact), 0 for no monotonicity constraints.
|
init_min
|
The lower bound on the range of initialized weights.
|
init_max
|
The upper bound on the range of initialized weights.
|
dtype
|
dtype
|
seed
|
A Python integer. Used to create a random seed for the distribution.
|
Returns |
Kronecker-Factored Lattice weights tensor of shape:
(1, lattice_sizes, units * dims, num_terms) .
|
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."],[],[]]