8000 changes to memory print function. · caffeine-coder1/computer_vision@0e485ac · GitHub
[go: up one dir, main page]

Skip to content

Commit 0e485ac

Browse files
changes to memory print function.
1 parent bf7ba99 commit 0e485ac

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

GAN/WGAN/general.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ def print_memory_utilization(GPU_INDEX=0):
120120
r = torch.cuda.memory_reserved(GPU_INDEX)
121121
a = torch.cuda.memory_allocated(GPU_INDEX)
122122
f = r-a # free inside reserved
123-
print(f"total Memory: {t:.4f} available: {f:.4f}")
123+
print(f"Total: {t/1e9:.2f}GB| Reservered: {r/1e9:.2f}GB|"
124+
+ f"Allocated: {a/1e9:.2f}GB| available: {f/1e9:.2f}GB")
124125

125126

126127
# ~~~~~~~~~~~~~~~~~~~~~ network helper functions ~~~~~~~~~~~~~~~~~~~~~ #

0 commit comments

Comments
 (0)
0