pytorch-ssd
pytorch-ssd copied to clipboard
[save the entire model failed]
load and inference work ok. and I am trying to save the entire model (including both architecture and weights),but failed. in detail,torch.save(net,'mb_v1_ssd_all.pth') when run the code, it failed , the error information : TypeError: can't pickle module objects ( we can save weights only successfully by : torch.save(net.state_dict(),'mb_v1_ssd.pth'))
For some purpose , i must save the entire model now. Is anyone encountered the same problem? or could someone give me some idea?
plz save the net.state_dict()
@q
plz save the net.state_dict()
why using torch.save(net, path) doesn't work. In my case, I also need to save whole model. How can I save whole model