You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 30, 2018. It is now read-only.
I have caffe2, onnx, onnx-caffe2 installed on a macbook (following the anaconda installation instructions).
I'm attempting to run the tutorial on converting a super-resolution model from pytorch to caffe2 via ONNX. The torch.onnx commands to save the model to onnx seem to work fine. However, when I try to use the saved model via the onnx-caffe2 backend's prepare method, I receive an attribute error, as shown below.
IIn [51]: model = onnx.load("/Users/ohara/data/models/super_resolution.onnx")
In [52]: prepared_backend = onnx_caffe2.backend.prepare(model)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-52-2fbcb732bd1d> in <module>()
----> 1 prepared_backend = onnx_caffe2.backend.prepare(model)
/Users/ohara/anaconda3/envs/python2/lib/python2.7/site-packages/onnx_caffe2/backend.pyc in prepare(cls, predict_graph, device, init_graph, **kwargs)
309 init_net = caffe2_pb2.NetDef()
310
--> 311 predict_net, _ = cls._onnx_graph_to_caffe2_net(predict_graph)
312 predict_net.device_option.CopyFrom(get_device_option(device))
313
/Users/ohara/anaconda3/envs/python2/lib/python2.7/site-packages/onnx_caffe2/backend.pyc in _onnx_graph_to_caffe2_net(cls, graph_def)
423
424 net_def = caffe2_pb2.NetDef()
--> 425 net_def.name = graph_def.name
426
427 # environment from ONNX name to Caffe2 name
AttributeError: 'ModelProto' object has no attribute 'name'
The text was updated successfully, but these errors were encountered:
Looks like that your onnx and onnx-caffe2 are directly pulled from conda? There have been some updates happened recently, please follow instructions on github front page to install them from source.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have caffe2, onnx, onnx-caffe2 installed on a macbook (following the anaconda installation instructions).
I'm attempting to run the tutorial on converting a super-resolution model from pytorch to caffe2 via ONNX. The torch.onnx commands to save the model to onnx seem to work fine. However, when I try to use the saved model via the onnx-caffe2 backend's prepare method, I receive an attribute error, as shown below.
The text was updated successfully, but these errors were encountered: