Comments (13)
I met the same problem. I want to convert yolact_plus to onnx.
import DCNv2
def evalimage(net:Yolact, path:str, save_path:str=None):
frame = torch.from_numpy(cv2.imread(path)).float()
batch = FastBaseTransform()(frame.unsqueeze(0))
preds = net(batch)
torch.onnx.export(net, batch, "yolact_plus.onnx",operator_export_type=DCNv2)
Error
Multiple GPUs detected! Turning off JIT.
Config not specified. Parsed yolact_plus_base_config from the file name.Loading model... Done.
/home/kiwi/Document/yolact/DCNv2/dcn_v2.py:31: TracerWarning: Converting a tensor to a Python integer might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
ctx.deformable_groups)
/home/kiwi/Document/yolact/yolact.py:221: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
if self.last_img_size != (cfg._tmp_img_w, cfg._tmp_img_h):
Traceback (most recent call last):
File "eval.py", line 1123, in
evaluate(net, dataset)
File "eval.py", line 895, in evaluate
evalimage(net, args.image)
File "eval.py", line 609, in evalimage
torch.onnx.export(net, batch, "yolact_plus.onnx",operator_export_type=DCNv2)
File "/home/kiwi/miniconda3/envs/detectron2/lib/python3.6/site-packages/torch/onnx/init.py", line 148, in export
strip_doc_string, dynamic_axes, keep_initializers_as_inputs)
File "/home/kiwi/miniconda3/envs/detectron2/lib/python3.6/site-packages/torch/onnx/utils.py", line 66, in export
dynamic_axes=dynamic_axes, keep_initializers_as_inputs=keep_initializers_as_inputs)
File "/home/kiwi/miniconda3/envs/detectron2/lib/python3.6/site-packages/torch/onnx/utils.py", line 416, in _export
fixed_batch_size=fixed_batch_size)
File "/home/kiwi/miniconda3/envs/detectron2/lib/python3.6/site-packages/torch/onnx/utils.py", line 296, in _model_to_graph
fixed_batch_size=fixed_batch_size, params_dict=params_dict)
File "/home/kiwi/miniconda3/envs/detectron2/lib/python3.6/site-packages/torch/onnx/utils.py", line 135, in _optimize_graph
graph = torch._C._jit_pass_onnx(graph, operator_export_type)
TypeError: _jit_pass_onnx(): incompatible function arguments. The following argument types are supported:
1. (arg0: torch::jit::Graph, arg1: torch._C._onnx.OperatorExportTypes) -> torch::jit::Graph
from dcnv2.
Same requirements. Thanks
from dcnv2.
RuntimeError: ONNX export failed: Couldn't export Python operator _DCNv2
from dcnv2.
RuntimeError: ONNX export failed: Couldn't export Python operator _DCNv2
same error, did u resolve it?
from dcnv2.
@jinfagang Hi, have you get some answer to solve this problem?
from dcnv2.
+1
from dcnv2.
Any updates?
from dcnv2.
+1
from dcnv2.
+1
from dcnv2.
@dheerajpreddy ,have you sloved your problems?I meet the same problem,I would be grateful you could give any information.
from dcnv2.
Any information or progress on this issue? I have same requirement to convert DCNv2 to ONNX
from dcnv2.
+1
from dcnv2.
+1
from dcnv2.
Related Issues (20)
- Fail to export ONNX model
- 关于编译报错的问题
- How can I add 'groups' into deformable conv?
- difference between DCNv2 and deform_conv2d in torchvision HOT 3
- ATen/cuda/CUDAContext.h
- DCNv2 python setup.py build develop give Error
- error: command 'g++' failed with exit status 1 HOT 4
- error: command 'g++' failed with exit status 1 HOT 1
- error: ‘THFloatBlas_gemv’ was not declared in this scope HOT 1
- module '_ext' has no attribute 'dcn_v2_forward'
- Build error parameter packs not expanded with ‘...’
- The repository need an update with the newer versions of pytorch HOT 1
- > > > pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cu110/torch_nightly.html
- There is a problem with the code in gnn_parse.py
- TH/TH.h: No such file or directory HOT 7
- ‘THFloatBlas_gemv’ was not declared in this scope
- pytorch version problem HOT 1
- I've already installed DCNv2, but it's still marked red HOT 1
- ImportError: dynamic module does not define module export function (PyInit__ext)
- error: command 'g++' failed with exit status 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dcnv2.