AttributeError: 'torch.Size' object has no attribute 'numel'
xiaoketongxue opened this issue · 1 comments
xiaoketongxue commented
AttributeError: 'torch.Size' object has no attribute 'numel'
dinggd commented
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!