Skip to content

No module named 'torch.onnx' when following super_resolution_with_caffe2.html  #147

@liqunfu

Description

@liqunfu

I am following tutorial http://pytorch.org/tutorials/advanced/super_resolution_with_caffe2.html (Transfering a model from PyTorch to Caffe2 and Mobile using ONNX). At the beginning I get:
ModuleNotFoundError Traceback (most recent call last)
in ()
5 from torch.autograd import Variable
6 import torch.utils.model_zoo as model_zoo
----> 7 import torch.onnx

ModuleNotFoundError: No module named 'torch.onnx'

My environment is: Ubuntu 16.04, anaconda 4.3.25. my environment has Python 3.6. PyTorch 0.20. onnx 0.1, torchvision 0.1.9.

Please let me know what is missing, Thanks,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions