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
It turns out you can load your .pth.tar
file directly withtorch.load
:
state_dict = torch.load(model_name)
See this thread for reference.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.