Initializes scale to alternate between 1 and -1 for each term.
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 .
|
get_config
get_config()
Returns the configuration of the initializer as a JSON-serializable dict.
Returns |
A JSON-serializable Python dict.
|
__call__
View source
__call__(
shape, dtype=None, partition_info=None
)
Returns weights of tfl.layers.KroneckerFactoredLattice
scale.
Args |
shape
|
Must be: (units, num_terms) .
|
dtype
|
Standard Keras initializer param.
|
partition_info
|
Standard Keras initializer param. Not used.
|