query2labels
query2labels copied to clipboard
为什么训练时保存的是.pth文件,推理时用的是.pkl文件?
看源代码,在训练时,main_mlc.save_checkpoint里面,结果保存在model_best.pth.tar,这样的pth文件。 在推理的时候,作者给的脚本
python q2l_infer.py -a modelname --config /path/to/json/file --resume /path/to/pkl/file [other args]
e.g.
python q2l_infer.py -a 'Q2L-R101-448' --config "pretrained/Q2L-R101-448/config_new.json" -b 16 --resume 'pretrained/Q2L-R101-448/checkpoint.pkl'
为啥是这样啊?应该怎么处理?
可能我没注意。 重命名一下文件应该就行了
可能我没注意。 重命名一下文件应该就行了
好的,谢谢大佬