Why does a `.pth` file take so much larger space? (I am missing something)

Hi,

The size it will take on gpu is the size of all the tensors. So the following will give you the memory in Bytes:

size = 0
for p in model.parameters():
  size += p.nelement() * p.element_size()