"AttributeError: 'collections.OrderedDict' object has no attribute 'state_dict"

Hi,
thank you very much.
I tried as you told me.
It seems both
net.load_state_dict(torch.load(model_path))
and
net.load(model_path)
works well(inference correctly)
but still , I don’t know how to save a whole model in the case.

using “net.load_state_dict(torch.load(model_path))” and torch.save(net,‘mb_v1_ssd_all.pth’)
still give en error:
File “/home/hong/anaconda3/envs/PyTorch1.0_GPU_ONNX/lib/python3.7/site-packages/torch/serialization.py”, line 291, in _save
pickler.dump(obj)
TypeError: can’t pickle module objects