Skip to content

Commit

Permalink
Merge pull request #7 from aock/fix-memory
Browse files Browse the repository at this point in the history
PoseTracker.get_memory() fix
  • Loading branch information
louis-wiesmann authored Feb 14, 2024
2 parents 885d1b6 + 5d24d11 commit e17b766
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/loc_ndf/utils/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,14 @@ def registration_step(self, points: torch.Tensor, GM_k=None):

def get_memory(self):
param_size = 0
buffer_size = 0

for model in self.models:
for param in model.parameters():
param_size += param.nelement() * param.element_size()
buffer_size = 0
for buffer in model.buffers():
buffer_size += buffer.nelement() * buffer.element_size()

size_all_mb = (param_size + buffer_size) / 1024**2
return size_all_mb
##############################################################################
Expand Down

0 comments on commit e17b766

Please sign in to comment.