In some projects, they called
torch.load with ‘pth.tar’ extension.
I think ‘pth’ is for ‘PyTorcH’, but what is ‘tar’ for…?
Actually I had tried to open ‘pth.tar’ files with Archive Manager and failed
Just for curious.
Thanks in advance.
.tar refers to tarball and is an archive file.
As far as I know, the legacy serialization module used
You can find more information about this file format in the Wikipedia article.
To add some advice you didn’t ask for: I’d recommend to just use
.pt as the extension.
As you rightly note it’s been long ago that this used to be a tar file, and pth isn’t particularly compatible with Python’s “.pth” path files (there is an open issue to standardize on
.pt in the PyTorch examples).
I agree, since it doesn’t seem like we actually need to tar/untar files when we use Pytorch’s
load_state_dict functions. Hence, it’s just unnecessary overhead to explicitly write out the tar