jack gell
jack gell

Reputation: 195

how to convert .pth.tar file to a .pt?

I have a .pth.tar file how can I read in that file and then save it to the same directory in a .pt file?

I am using the modelzoo mlnf file which I cannot find its .pt equivalent.

https://kaiyangzhou.github.io/deep-person-reid/MODEL_ZOO.html

Upvotes: 1

Views: 2843

Answers (1)

Ivan
Ivan

Reputation: 40648

It turns out you can load your .pth.tar file directly with torch.load:

state_dict = torch.load(model_name)

See this thread for reference.

Upvotes: 2

Related Questions