Skip to content

Commit 09cc340

Browse files
committed
Update worker_training.py
1 parent 0dff8e2 commit 09cc340

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

napari_cellseg3d/code_models/worker_training.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,10 +546,10 @@ def get_loader_func(num_samples):
546546
if device.type == "cuda":
547547
self.log("Memory Usage:")
548548
alloc_mem = round(
549-
torch.cuda.memory_allocated(device_id) / 1024**3, 1
549+
torch.cuda.memory_allocated(device) / 1024**3, 1
550550
)
551551
reserved_mem = round(
552-
torch.cuda.memory_reserved(device_id) / 1024**3, 1
552+
torch.cuda.memory_reserved(device) / 1024**3, 1
553553
)
554554
self.log(f"Allocated: {alloc_mem}GB")
555555
self.log(f"Cached: {reserved_mem}GB")

0 commit comments

Comments
 (0)