View source on GitHub
|
A stateless-style RNG handler for TensorFlow.
meridian.backend.RNGHandler(
seed: SeedType
)
This handler canonicalizes any seed input into a single stateless seed Tensor.
Args | |
|---|---|
seed
|
The initial seed. Can be an integer, a sequence of two integers, a corresponding Tensor, or None. It will be sanitized and stored internally as a single stateless seed Tensor. |
Methods
advance_handler
advance_handler() -> '_TFRNGHandler'
Creates a new handler from a new seed and advances the current handler.
get_kernel_seed
get_kernel_seed() -> Any
Provides the current stateless seed of the handler without advancing it.
get_next_seed
get_next_seed() -> Any
Returns a new unique seed and advances the handler's internal state.
View source on GitHub