LostTech.TensorFlow : API Documentation

Type tf.config.experimental

Namespace tensorflow

Public static methods

string get_device_policy()

Gets the current device policy.

The device policy controls how operations requiring inputs on a specific device (e.g., on GPU:0) handle inputs on a different device (e.g. GPU:1).

This function only gets the device policy for the current thread. Any subsequently started thread will again use the default policy.
Returns
string
Current thread device policy

object get_device_policy_dyn()

Gets the current device policy.

The device policy controls how operations requiring inputs on a specific device (e.g., on GPU:0) handle inputs on a different device (e.g. GPU:1).

This function only gets the device policy for the current thread. Any subsequently started thread will again use the default policy.
Returns
object
Current thread device policy

bool get_synchronous_execution()

Gets whether operations are executed synchronously or asynchronously.

TensorFlow can execute operations synchronously or asynchronously. If asynchronous execution is enabled, operations may return "non-ready" handles.
Returns
bool
Current thread execution mode

object get_synchronous_execution_dyn()

Gets whether operations are executed synchronously or asynchronously.

TensorFlow can execute operations synchronously or asynchronously. If asynchronous execution is enabled, operations may return "non-ready" handles.
Returns
object
Current thread execution mode

void set_device_policy(string device_policy)

Sets the current thread device policy.

The device policy controls how operations requiring inputs on a specific device (e.g., on GPU:0) handle inputs on a different device (e.g. GPU:1).

When using the default, an appropriate policy will be picked automatically. The default policy may change over time.

This function only sets the device policy for the current thread. Any subsequently started thread will again use the default policy.
Parameters
string device_policy
A device policy. Valid values: - None: Switch to a system default. - 'warn': Copies the tensors which are not on the right device and logs a warning. - 'explicit': Raises an error if the placement is not as required. - 'silent': Silently copies the tensors. Note that this may hide performance problems as there is no notification provided when operations are blocked on the tensor being copied between devices. - 'silent_for_int32': silently copies `int32` tensors, raising errors on the other ones.

object set_device_policy_dyn(object device_policy)

Sets the current thread device policy.

The device policy controls how operations requiring inputs on a specific device (e.g., on GPU:0) handle inputs on a different device (e.g. GPU:1).

When using the default, an appropriate policy will be picked automatically. The default policy may change over time.

This function only sets the device policy for the current thread. Any subsequently started thread will again use the default policy.
Parameters
object device_policy
A device policy. Valid values: - None: Switch to a system default. - 'warn': Copies the tensors which are not on the right device and logs a warning. - 'explicit': Raises an error if the placement is not as required. - 'silent': Silently copies the tensors. Note that this may hide performance problems as there is no notification provided when operations are blocked on the tensor being copied between devices. - 'silent_for_int32': silently copies `int32` tensors, raising errors on the other ones.

void set_synchronous_execution(bool enable)

Specifies whether operations are executed synchronously or asynchronously.

TensorFlow can execute operations synchronously or asynchronously. If asynchronous execution is enabled, operations may return "non-ready" handles.

When `enable` is set to None, an appropriate value will be picked automatically. The value picked may change between TensorFlow releases.
Parameters
bool enable
Whether operations should be dispatched synchronously. Valid values: - None: sets the system default. - True: executes each operation synchronously. - False: executes each operation asynchronously.

object set_synchronous_execution_dyn(object enable)

Specifies whether operations are executed synchronously or asynchronously.

TensorFlow can execute operations synchronously or asynchronously. If asynchronous execution is enabled, operations may return "non-ready" handles.

When `enable` is set to None, an appropriate value will be picked automatically. The value picked may change between TensorFlow releases.
Parameters
object enable
Whether operations should be dispatched synchronously. Valid values: - None: sets the system default. - True: executes each operation synchronously. - False: executes each operation asynchronously.

Public properties

PythonFunctionContainer get_device_policy_fn get;

PythonFunctionContainer get_memory_growth_fn get;

PythonFunctionContainer get_synchronous_execution_fn get;

PythonFunctionContainer get_virtual_device_configuration_fn get;

PythonFunctionContainer get_visible_devices_fn get;

PythonFunctionContainer list_logical_devices_fn get;

PythonFunctionContainer list_physical_devices_fn get;

PythonFunctionContainer set_device_policy_fn get;

PythonFunctionContainer set_memory_growth_fn get;

PythonFunctionContainer set_synchronous_execution_fn get;

PythonFunctionContainer set_virtual_device_configuration_fn get;

PythonFunctionContainer set_visible_devices_fn get;