MhLiao / DB

A PyTorch implementation of "Real-time Scene Text Detection with Differentiable Binarization".
2.1k stars 479 forks source link

RuntimeError: ONNX export failed: Couldn't export Python operator ModulatedDeformConvFunction #340

Open allen20200111 opened 2 years ago

allen20200111 commented 2 years ago

Defined at: detector/../detector/db/assets/ops/dcn/modules/deform_conv.py(128): forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1090): _slow_forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1102): _call_impl detector/../detector/db/backbones/resnet.py(159): forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1090): _slow_forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1102): _call_impl /usr/local/lib/python3.6/dist-packages/torch/nn/modules/container.py(141): forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1090): _slow_forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1102): _call_impl detector/../detector/db/backbones/resnet.py(241): forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1090): _slow_forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1102): _call_impl detector/dbnet-plus-onnx.py(522): forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1090): _slow_forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1102): _call_impl /usr/local/lib/python3.6/dist-packages/torch/jit/_trace.py(118): wrapper /usr/local/lib/python3.6/dist-packages/torch/jit/_trace.py(132): forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1102): _call_impl /usr/local/lib/python3.6/dist-packages/torch/jit/_trace.py(1166): _get_trace_graph /usr/local/lib/python3.6/dist-packages/torch/onnx/utils.py(388): _trace_and_get_graph_from_model /usr/local/lib/python3.6/dist-packages/torch/onnx/utils.py(437): _create_jit_graph /usr/local/lib/python3.6/dist-packages/torch/onnx/utils.py(493): _model_to_graph /usr/local/lib/python3.6/dist-packages/torch/onnx/utils.py(729): _export /usr/local/lib/python3.6/dist-packages/torch/onnx/utils.py(111): export /usr/local/lib/python3.6/dist-packages/torch/onnx/init.py(320): export detector/dbnet-plus-onnx.py(655):

Graph we tried to export: graph(%input : Float(1, 3, , , strides=[2260992, 753664, 736, 1], requires_grad=0, device=cuda:0), %backbone.layer2.0.conv2_offset.weight : Float(27, 128, 3, 3, strides=[1152, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer2.0.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.0.conv2.weight : Float(128, 128, 3, 3, strides=[1152, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer2.0.bn2.weight : Float(128, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.0.bn2.bias : Float(128, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.0.bn2.running_mean : Float(128, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer2.0.bn2.running_var : Float(128, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer2.1.conv2_offset.weight : Float(27, 128, 3, 3, strides=[1152, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer2.1.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.1.conv2.weight : Float(128, 128, 3, 3, strides=[1152, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer2.1.bn2.weight : Float(128, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.1.bn2.bias : Float(128, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.1.bn2.running_mean : Float(128, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer2.1.bn2.running_var : Float(128, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer2.2.conv2_offset.weight : Float(27, 128, 3, 3, strides=[1152, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer2.2.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.2.conv2.weight : Float(128, 128, 3, 3, strides=[1152, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer2.2.bn2.weight : Float(128, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.2.bn2.bias : Float(128, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.2.bn2.running_mean : Float(128, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer2.2.bn2.running_var : Float(128, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer2.3.conv2_offset.weight : Float(27, 128, 3, 3, strides=[1152, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer2.3.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.3.conv2.weight : Float(128, 128, 3, 3, strides=[1152, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer2.3.bn2.weight : Float(128, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.3.bn2.bias : Float(128, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.3.bn2.running_mean : Float(128, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer2.3.bn2.running_var : Float(128, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.0.conv2_offset.weight : Float(27, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.0.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.0.conv2.weight : Float(256, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.0.bn2.weight : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.0.bn2.bias : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.0.bn2.running_mean : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.0.bn2.running_var : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.1.conv2_offset.weight : Float(27, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.1.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.1.conv2.weight : Float(256, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.1.bn2.weight : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.1.bn2.bias : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.1.bn2.running_mean : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.1.bn2.running_var : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.2.conv2_offset.weight : Float(27, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.2.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.2.conv2.weight : Float(256, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.2.bn2.weight : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.2.bn2.bias : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.2.bn2.running_mean : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.2.bn2.running_var : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.3.conv2_offset.weight : Float(27, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.3.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.3.conv2.weight : Float(256, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.3.bn2.weight : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.3.bn2.bias : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.3.bn2.running_mean : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.3.bn2.running_var : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.4.conv2_offset.weight : Float(27, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.4.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.4.conv2.weight : Float(256, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.4.bn2.weight : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.4.bn2.bias : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.4.bn2.running_mean : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.4.bn2.running_var : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.5.conv2_offset.weight : Float(27, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.5.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.5.conv2.weight : Float(256, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.5.bn2.weight : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.5.bn2.bias : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.5.bn2.running_mean : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.5.bn2.running_var : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer4.0.conv2_offset.weight : Float(27, 512, 3, 3, strides=[4608, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer4.0.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer4.0.conv2.weight : Float(512, 512, 3, 3, strides=[4608, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer4.0.bn2.weight : Float(512, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer4.0.bn2.bias : Float(512, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer4.0.bn2.running_mean : Float(512, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer4.0.bn2.running_var : Float(512, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer4.1.conv2_offset.weight : Float(27, 512, 3, 3, strides=[4608, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer4.1.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0),

stealth0414 commented 1 year ago

Defined at: detector/../detector/db/assets/ops/dcn/modules/deform_conv.py(128): forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1090): _slow_forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1102): _call_impl detector/../detector/db/backbones/resnet.py(159): forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1090): _slow_forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1102): _call_impl /usr/local/lib/python3.6/dist-packages/torch/nn/modules/container.py(141): forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1090): _slow_forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1102): _call_impl detector/../detector/db/backbones/resnet.py(241): forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1090): _slow_forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1102): _call_impl detector/dbnet-plus-onnx.py(522): forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1090): _slow_forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1102): _call_impl /usr/local/lib/python3.6/dist-packages/torch/jit/_trace.py(118): wrapper /usr/local/lib/python3.6/dist-packages/torch/jit/_trace.py(132): forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1102): _call_impl /usr/local/lib/python3.6/dist-packages/torch/jit/_trace.py(1166): _get_trace_graph /usr/local/lib/python3.6/dist-packages/torch/onnx/utils.py(388): _trace_and_get_graph_from_model /usr/local/lib/python3.6/dist-packages/torch/onnx/utils.py(437): _create_jit_graph /usr/local/lib/python3.6/dist-packages/torch/onnx/utils.py(493): _model_to_graph /usr/local/lib/python3.6/dist-packages/torch/onnx/utils.py(729): _export /usr/local/lib/python3.6/dist-packages/torch/onnx/utils.py(111): export /usr/local/lib/python3.6/dist-packages/torch/onnx/init.py(320): export detector/dbnet-plus-onnx.py(655):

Graph we tried to export: graph(%input : Float(1, 3, , , strides=[2260992, 753664, 736, 1], requires_grad=0, device=cuda:0), %backbone.layer2.0.conv2_offset.weight : Float(27, 128, 3, 3, strides=[1152, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer2.0.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.0.conv2.weight : Float(128, 128, 3, 3, strides=[1152, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer2.0.bn2.weight : Float(128, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.0.bn2.bias : Float(128, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.0.bn2.running_mean : Float(128, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer2.0.bn2.running_var : Float(128, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer2.1.conv2_offset.weight : Float(27, 128, 3, 3, strides=[1152, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer2.1.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.1.conv2.weight : Float(128, 128, 3, 3, strides=[1152, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer2.1.bn2.weight : Float(128, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.1.bn2.bias : Float(128, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.1.bn2.running_mean : Float(128, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer2.1.bn2.running_var : Float(128, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer2.2.conv2_offset.weight : Float(27, 128, 3, 3, strides=[1152, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer2.2.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.2.conv2.weight : Float(128, 128, 3, 3, strides=[1152, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer2.2.bn2.weight : Float(128, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.2.bn2.bias : Float(128, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.2.bn2.running_mean : Float(128, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer2.2.bn2.running_var : Float(128, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer2.3.conv2_offset.weight : Float(27, 128, 3, 3, strides=[1152, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer2.3.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.3.conv2.weight : Float(128, 128, 3, 3, strides=[1152, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer2.3.bn2.weight : Float(128, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.3.bn2.bias : Float(128, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.3.bn2.running_mean : Float(128, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer2.3.bn2.running_var : Float(128, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.0.conv2_offset.weight : Float(27, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.0.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.0.conv2.weight : Float(256, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.0.bn2.weight : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.0.bn2.bias : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.0.bn2.running_mean : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.0.bn2.running_var : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.1.conv2_offset.weight : Float(27, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.1.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.1.conv2.weight : Float(256, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.1.bn2.weight : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.1.bn2.bias : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.1.bn2.running_mean : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.1.bn2.running_var : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.2.conv2_offset.weight : Float(27, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.2.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.2.conv2.weight : Float(256, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.2.bn2.weight : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.2.bn2.bias : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.2.bn2.running_mean : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.2.bn2.running_var : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.3.conv2_offset.weight : Float(27, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.3.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.3.conv2.weight : Float(256, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.3.bn2.weight : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.3.bn2.bias : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.3.bn2.running_mean : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.3.bn2.running_var : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.4.conv2_offset.weight : Float(27, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.4.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.4.conv2.weight : Float(256, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.4.bn2.weight : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.4.bn2.bias : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.4.bn2.running_mean : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.4.bn2.running_var : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.5.conv2_offset.weight : Float(27, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.5.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.5.conv2.weight : Float(256, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.5.bn2.weight : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.5.bn2.bias : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.5.bn2.running_mean : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.5.bn2.running_var : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer4.0.conv2_offset.weight : Float(27, 512, 3, 3, strides=[4608, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer4.0.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer4.0.conv2.weight : Float(512, 512, 3, 3, strides=[4608, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer4.0.bn2.weight : Float(512, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer4.0.bn2.bias : Float(512, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer4.0.bn2.running_mean : Float(512, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer4.0.bn2.running_var : Float(512, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer4.1.conv2_offset.weight : Float(27, 512, 3, 3, strides=[4608, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer4.1.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0),

Have you solved the problem?

GermanDeer commented 1 year ago

Defined at: detector/../detector/db/assets/ops/dcn/modules/deform_conv.py(128): forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1090): _slow_forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1102): _call_impl detector/../detector/db/backbones/resnet.py(159): forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1090): _slow_forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1102): _call_impl /usr/local/lib/python3.6/dist-packages/torch/nn/modules/container.py(141): forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1090): _slow_forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1102): _call_impl detector/../detector/db/backbones/resnet.py(241): forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1090): _slow_forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1102): _call_impl detector/dbnet-plus-onnx.py(522): forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1090): _slow_forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1102): _call_impl /usr/local/lib/python3.6/dist-packages/torch/jit/_trace.py(118): wrapper /usr/local/lib/python3.6/dist-packages/torch/jit/_trace.py(132): forward /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py(1102): _call_impl /usr/local/lib/python3.6/dist-packages/torch/jit/_trace.py(1166): _get_trace_graph /usr/local/lib/python3.6/dist-packages/torch/onnx/utils.py(388): _trace_and_get_graph_from_model /usr/local/lib/python3.6/dist-packages/torch/onnx/utils.py(437): _create_jit_graph /usr/local/lib/python3.6/dist-packages/torch/onnx/utils.py(493): _model_to_graph /usr/local/lib/python3.6/dist-packages/torch/onnx/utils.py(729): _export /usr/local/lib/python3.6/dist-packages/torch/onnx/utils.py(111): export /usr/local/lib/python3.6/dist-packages/torch/onnx/init.py(320): export detector/dbnet-plus-onnx.py(655): Graph we tried to export: graph(%input : Float(1, 3, , , strides=[2260992, 753664, 736, 1], requires_grad=0, device=cuda:0), %backbone.layer2.0.conv2_offset.weight : Float(27, 128, 3, 3, strides=[1152, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer2.0.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.0.conv2.weight : Float(128, 128, 3, 3, strides=[1152, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer2.0.bn2.weight : Float(128, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.0.bn2.bias : Float(128, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.0.bn2.running_mean : Float(128, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer2.0.bn2.running_var : Float(128, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer2.1.conv2_offset.weight : Float(27, 128, 3, 3, strides=[1152, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer2.1.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.1.conv2.weight : Float(128, 128, 3, 3, strides=[1152, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer2.1.bn2.weight : Float(128, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.1.bn2.bias : Float(128, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.1.bn2.running_mean : Float(128, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer2.1.bn2.running_var : Float(128, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer2.2.conv2_offset.weight : Float(27, 128, 3, 3, strides=[1152, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer2.2.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.2.conv2.weight : Float(128, 128, 3, 3, strides=[1152, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer2.2.bn2.weight : Float(128, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.2.bn2.bias : Float(128, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.2.bn2.running_mean : Float(128, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer2.2.bn2.running_var : Float(128, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer2.3.conv2_offset.weight : Float(27, 128, 3, 3, strides=[1152, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer2.3.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.3.conv2.weight : Float(128, 128, 3, 3, strides=[1152, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer2.3.bn2.weight : Float(128, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.3.bn2.bias : Float(128, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer2.3.bn2.running_mean : Float(128, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer2.3.bn2.running_var : Float(128, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.0.conv2_offset.weight : Float(27, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.0.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.0.conv2.weight : Float(256, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.0.bn2.weight : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.0.bn2.bias : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.0.bn2.running_mean : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.0.bn2.running_var : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.1.conv2_offset.weight : Float(27, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.1.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.1.conv2.weight : Float(256, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.1.bn2.weight : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.1.bn2.bias : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.1.bn2.running_mean : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.1.bn2.running_var : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.2.conv2_offset.weight : Float(27, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.2.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.2.conv2.weight : Float(256, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.2.bn2.weight : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.2.bn2.bias : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.2.bn2.running_mean : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.2.bn2.running_var : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.3.conv2_offset.weight : Float(27, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.3.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.3.conv2.weight : Float(256, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.3.bn2.weight : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.3.bn2.bias : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.3.bn2.running_mean : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.3.bn2.running_var : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.4.conv2_offset.weight : Float(27, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.4.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.4.conv2.weight : Float(256, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.4.bn2.weight : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.4.bn2.bias : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.4.bn2.running_mean : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.4.bn2.running_var : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.5.conv2_offset.weight : Float(27, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.5.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.5.conv2.weight : Float(256, 256, 3, 3, strides=[2304, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer3.5.bn2.weight : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.5.bn2.bias : Float(256, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer3.5.bn2.running_mean : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer3.5.bn2.running_var : Float(256, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer4.0.conv2_offset.weight : Float(27, 512, 3, 3, strides=[4608, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer4.0.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer4.0.conv2.weight : Float(512, 512, 3, 3, strides=[4608, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer4.0.bn2.weight : Float(512, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer4.0.bn2.bias : Float(512, strides=[1], requires_grad=1, device=cuda:0), %backbone.layer4.0.bn2.running_mean : Float(512, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer4.0.bn2.running_var : Float(512, strides=[1], requires_grad=0, device=cuda:0), %backbone.layer4.1.conv2_offset.weight : Float(27, 512, 3, 3, strides=[4608, 9, 3, 1], requires_grad=1, device=cuda:0), %backbone.layer4.1.conv2_offset.bias : Float(27, strides=[1], requires_grad=1, device=cuda:0),

Have you solved the problem?

Hello! Is there any progress? I have the same issue

I use torch nightly 2.1.0 and CUDA 11.8 because there is an argument in torch.onnx.export() function autograd_inlining=False, that fixes error with IndexError: Argument passed to at() was not in the map.