You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
getsizeof internally calls the __sizeof__ method on the object, then it adds the garbage collection overhead to it and returns. Apparently __sizeof__ on PyTorch tensors doesn’t take the size of the underlying buffer into account:
From https://discuss.pytorch.org/t/data-type-when-change-tensor-array-to-numpy-array/9786
getsizeofinternally calls the__sizeof__method on the object, then it adds the garbage collection overhead to it and returns. Apparently__sizeof__on PyTorch tensors doesn’t take the size of the underlying buffer into account:I can take care of this a few days from now.