Swall0w/torchstat

AttributeError: 'torch.Size' object has no attribute 'numel'

xiaoketongxue opened this issue · 1 comments

AttributeError: 'torch.Size' object has no attribute 'numel'

Hi I have managed to resolve this problem by revising some codes in torchstat/compute_memory.py

Specifically, following revisions are made:

replacing all .size()[1:].numel() to[0].numel()
replacing all size().numel() to.numel()

There you can have the code running!