deepmd.pt.utils.auto_batch_size
Module Contents
Classes
Auto batch size. |
- class deepmd.pt.utils.auto_batch_size.AutoBatchSize(initial_batch_size: int = 1024, factor: float = 2.0)[source]
Bases:
deepmd.utils.batch_size.AutoBatchSize
Auto batch size.
- Parameters:
- is_oom_error(e: Exception) bool [source]
Check if the exception is an OOM error.
- Parameters:
- e
Exception
Exception
- e
- execute_all(callable: Callable, total_size: int, natoms: int, *args, **kwargs) Tuple[numpy.ndarray | torch.Tensor] [source]
Excuate a method with all given data.