Unverified Commit 50f69e70 authored by Jiamin's avatar Jiamin Committed by GitHub
Browse files

fix: _get_max_memory when model has no attr output_device (#416)

parent 71e32749
......@@ -50,7 +50,7 @@ class TextLoggerHook(LoggerHook):
self._dump_log(runner.meta, runner)
def _get_max_memory(self, runner):
device = runner.model.output_device
device = getattr(runner.model, 'output_device', None)
mem = torch.cuda.max_memory_allocated(device=device)
mem_mb = torch.tensor([mem / (1024 * 1024)],
dtype=torch.int,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment