osl_dynamics.inference.tf_ops#

Helper functions for TensorFlow operations.

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.

Module Contents#

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

Only allocate the amount of memory required on the GPU.

Return type:

None

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.

  • gpu_numbers (Union[List[int], int])

Return type:

None

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

Suppress messages from TensorFlow.

Must be called before osl_dynamics.inference.tf_ops.gpu_growth() and osl_dynamics.inference.tf_ops.select_gpu().

Parameters:

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

Return type:

None