Platform:
ubuntu 16.04
Python version:
3.5
Source framework with version (like Tensorflow 1.4.1 with GPU):
1.8
Actuaally , I use docker providing by

  
      
      GitHub
  
  
    

Microsoft/MMdnn 2

MMdnn is a set of tools to help users inter-operate among different deep learning frameworks. E.g. model conversion and visualization. Convert models between Caffe, Keras, MXNet, Tensorflow, CNTK, ...


  
  
    
    
  
  


I can successfully run the restnet18 and restnet34 downloaded by “mmdownload”
but error occurs converting my own model:
File “/usr/local/lib/python3.5/dist-packages/torch/jit/init.py”, line 259, in _unique_state_dict
state_dict = module.state_dict(keep_vars=keep_vars)
AttributeError: ‘collections.OrderedDict’ object has no attribute ‘state_dict’
So maybe the environment is OK,There must be something wrong with my pth ,In my python code :
net.load(model_path)
torch.save(net.state_dict(),‘mb_v1_ssd.pth’)
here, model_path  is a pth path(pth file) pretrained by others
Both the model_path’s pth and the mb_v1_ssd.pth output the same error
“AttributeError: ‘collections.OrderedDict’ object has no attribute 'state_dict”
Could someone please help ?