Activate the runner for inference. For example, this may involve allocating CPU or GPU memory.
(self)
| 54 | """bool: Whether this runner has been activated, either via context manager, or by calling ``activate()``.""" |
| 55 | |
| 56 | def __enter__(self): |
| 57 | """ |
| 58 | Activate the runner for inference. For example, this may involve allocating CPU or GPU memory. |
| 59 | """ |
| 60 | self.activate() |
| 61 | return self |
| 62 | |
| 63 | def __exit__(self, exc_type, exc_value, traceback): |
| 64 | """ |