LostTech.TensorFlow : API Documentation

Type tf.keras.mixed_precision.experimental

Namespace tensorflow

Public static methods

object global_policy()

Returns the global Policy.

The global policy is the default policy used for layers, if no policy is passed to the layer constructor. If no policy has been set with `keras.mixed_precision.experimental.set_policy`, this will return a policy constructed from `tf.keras.backend.floatx()` in TensorFlow 2, or an "infer" policy in TensorFlow 1.

See `keras.mixed_precision.experimental.Policy` for more information.
Returns
object
The global Policy.

object global_policy_dyn()

Returns the global Policy.

The global policy is the default policy used for layers, if no policy is passed to the layer constructor. If no policy has been set with `keras.mixed_precision.experimental.set_policy`, this will return a policy constructed from `tf.keras.backend.floatx()` in TensorFlow 2, or an "infer" policy in TensorFlow 1.

See `keras.mixed_precision.experimental.Policy` for more information.
Returns
object
The global Policy.

void set_policy(Policy policy)

Sets the global Policy.

The global policy is the default policy used for layers, if no policy is passed to the layer constructor. If no global policy is set, layers will instead default to a Policy constructed from `tf.keras.backend.floatx()` in TensorFlow 2. In TensorFlow 1, layers default to an "infer" policy.

See `keras.mixed_precision.experimental.Policy` for more information.
Parameters
Policy policy
A Policy, or a string that will be converted to a Policy..

void set_policy(string policy)

Sets the global Policy.

The global policy is the default policy used for layers, if no policy is passed to the layer constructor. If no global policy is set, layers will instead default to a Policy constructed from `tf.keras.backend.floatx()` in TensorFlow 2. In TensorFlow 1, layers default to an "infer" policy.

See `keras.mixed_precision.experimental.Policy` for more information.
Parameters
string policy
A Policy, or a string that will be converted to a Policy..

object set_policy_dyn(object policy)

Sets the global Policy.

The global policy is the default policy used for layers, if no policy is passed to the layer constructor. If no global policy is set, layers will instead default to a Policy constructed from `tf.keras.backend.floatx()` in TensorFlow 2. In TensorFlow 1, layers default to an "infer" policy.

See `keras.mixed_precision.experimental.Policy` for more information.
Parameters
object policy
A Policy, or a string that will be converted to a Policy..

Public properties

PythonFunctionContainer global_policy_fn get;

PythonFunctionContainer set_policy_fn get;