otx.backend.native.tools#

Utilities for Native backend.

Functions

adapt_batch_size(engine[, not_increase, ...])

Change the actual batch size depending on the current GPU status.

otx.backend.native.tools.adapt_batch_size(engine: OTXEngine, not_increase: bool = True, callbacks: list[Callback] | Callback | None = None, **train_args) None[source]#

Change the actual batch size depending on the current GPU status.

If not_increase is True, check current batch size is available to GPU and if not, decrease batch size. If not_increase is False, increase batch size to use most of GPU memory.

Parameters:
  • engine (OTXEngine) – engine instnace.

  • not_increase (bool) – Whether adapting batch size to larger value than default value or not.

  • callbacks (list[Callback] | Callback | None, optional) – callbacks used during training. Defaults to None.