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.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{
"lastModified": "Last updated 2024-08-02 UTC.",
"confidential": False
}