We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0dff8e2 commit 09cc340Copy full SHA for 09cc340
napari_cellseg3d/code_models/worker_training.py
@@ -546,10 +546,10 @@ def get_loader_func(num_samples):
546
if device.type == "cuda":
547
self.log("Memory Usage:")
548
alloc_mem = round(
549
- torch.cuda.memory_allocated(device_id) / 1024**3, 1
+ torch.cuda.memory_allocated(device) / 1024**3, 1
550
)
551
reserved_mem = round(
552
- torch.cuda.memory_reserved(device_id) / 1024**3, 1
+ torch.cuda.memory_reserved(device) / 1024**3, 1
553
554
self.log(f"Allocated: {alloc_mem}GB")
555
self.log(f"Cached: {reserved_mem}GB")
0 commit comments