ocssw
V2022
|
MDN.model.utils Namespace Reference
Functions | |
def | initialize_random_states (seed=None) |
def | ensure_format (arr) |
def | get_device (model_config) |
Function Documentation
◆ ensure_format()
def MDN.model.utils.ensure_format | ( | arr | ) |
◆ get_device()
def MDN.model.utils.get_device | ( | model_config | ) |
◆ initialize_random_states()
def MDN.model.utils.initialize_random_states | ( | seed = None | ) |
Initialize the numpy and tensorflow random states, setting the tensorflow global random state since most tensorflow methods don't yet pass around a random state appropriately. TF random states might also not play nice with tf.functions: https://www.tensorflow.org/api_docs/python/tf/random/set_global_generator