Hello,
From issues such that https://github.com/facebookresearch/detectron2/issues/657 I've learned that it is needed to use pytorch built from source to test new caffe2 exporting feature.
But due to this bug https://github.com/onnx/onnx/issues/2417 it is impossible to run detectron2.export.api.export_caffe2_model using pytorch==1.5.0a0+0dbd5c0 and onnx==1.6.0.
Assuming that onnx==1.6.0 is buggy I've tried to use onnx==1.5.0 but it is incompatible with pytorch==1.5.0a0
So all attempts end up with
~/anaconda2/envs/pytorch-master/lib/python3.7/site-packages/caffe2/python/onnx/backend.py in onnx_graph_to_caffe2_net(cls, model, device, opset_version)
919 @classmethod
920 def onnx_graph_to_caffe2_net(cls, model, device="CPU", opset_version=_known_opset_version):
--> 921 return cls._onnx_model_to_caffe2_net(model, device=device, opset_version=opset_version, include_initializers=True)
922
923 @classmethod
~/anaconda2/envs/pytorch-master/lib/python3.7/site-packages/caffe2/python/onnx/backend.py in _onnx_model_to_caffe2_net(cls, onnx_model, device, opset_version, include_initializers)
874 device_option = get_device_option(Device(device))
875
--> 876 onnx_model = onnx.utils.polish_model(onnx_model)
877 init_model = cls.optimize_onnx(onnx_model, init=True)
878 pred_model = cls.optimize_onnx(onnx_model, predict=True)
~/anaconda2/envs/pytorch-master/lib/python3.7/site-packages/onnx/utils.py in polish_model(model)
19 onnx.helper.strip_doc_string(model)
20 model = onnx.shape_inference.infer_shapes(model)
---> 21 model = onnx.optimizer.optimize(model)
22 onnx.checker.check_model(model)
23 return model
~/anaconda2/envs/pytorch-master/lib/python3.7/site-packages/onnx/optimizer.py in optimize(model, passes, fixed_point)
53 optimized_model_str = C.optimize_fixedpoint(model_str, passes)
54 else:
---> 55 optimized_model_str = C.optimize(model_str, passes)
56
57 return onnx.load_from_string(optimized_model_str)
IndexError: _Map_base::at
Is there a combination of installed libraries versions to test the new functionality?
The feature is not yet ready due to the dependencies like pytorch and onnx. Please wait until there are instructions on how to use it.
FYI: @ppwwyyxx 's recent commit fixes this issue: https://github.com/facebookresearch/detectron2/commit/b7ec43667df44fe5a483e0058ade2d44691e96bf
Most helpful comment
FYI: @ppwwyyxx 's recent commit fixes this issue: https://github.com/facebookresearch/detectron2/commit/b7ec43667df44fe5a483e0058ade2d44691e96bf