osl_dynamics.inference.tf_ops#

Helper functions for TensorFlow operations.

Module Contents#

Functions#

gpu_growth()

Only allocate the amount of memory required on the GPU.

select_gpu(gpu_numbers)

Allows the user to pick a GPU to use.

suppress_messages([level])

Suppress messages from TensorFlow.

Attributes#

_logger

osl_dynamics.inference.tf_ops._logger[source]#
osl_dynamics.inference.tf_ops.gpu_growth()[source]#

Only allocate the amount of memory required on the GPU.

osl_dynamics.inference.tf_ops.select_gpu(gpu_numbers)[source]#

Allows the user to pick a GPU to use.

Parameters:

gpu_number (list or int) – ID numbers for the GPU to use.

osl_dynamics.inference.tf_ops.suppress_messages(level=3)[source]#

Suppress messages from TensorFlow.

Must be called before gpu_growth and select_gpu.

Parameters:

level (int, optional) – The level for the messages to suppress.