Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6493 Discussions

Conversion from ONNX model to IR model fails

Yumi_ques
Novice
1,749 Views

System Information:
Ubuntu 18.04.5 LTS
OpenVINO:2022.1.0.643
PyTorch:1.8.1+cu102

 

Details:
We are attempting to convert the ESANet model, ESANet-R34-NBt1D (PyTorch), to ONNX and from ONNX to IR.
However, a RuntimeError occurs and conversion cannot be performed.

 

The command to run is
mo --input_model 20220523.onnx

 

The error message is as follows.
-------------------------------------------------------------------------------------------------------------

Model Optimizer arguments:
Common parameters:
- Path to the Input Model: /ESANet/ESANet/onnx_models/20220523.onnx
- Path for generated IR: /intel/openvino_2022.1.0.643/.
- IR output name: 20220523
- Log level: ERROR
- Batch: Not specified, inherited from the model
- Input layers: Not specified, inherited from the model
- Output layers: Not specified, inherited from the model
- Input shapes: Not specified, inherited from the model
- Source layout: Not specified
- Target layout: Not specified
- Layout: Not specified
- Mean values: Not specified
- Scale values: Not specified
- Scale factor: Not specified
- Precision of IR: FP32
- Enable fusing: True
- User transformations: Not specified
- Reverse input channels: False
- Enable IR generation for fixed input shape: False
- Use the transformations config file: None
Advanced parameters:
- Force the usage of legacy Frontend of Model Optimizer for model conversion into IR: False
- Force the usage of new Frontend of Model Optimizer for model conversion into IR: False
OpenVINO runtime found in: /intel/openvino_2022.1.0.643/python/python3.6/openvino
OpenVINO runtime version: 2022.1.0-7019-cdb9bec7210-releases/2022/1
Model Optimizer version: 2022.1.0-7019-cdb9bec7210-releases/2022/1
[ ERROR ] -------------------------------------------------
[ ERROR ] ----------------- INTERNAL ERROR ----------------
[ ERROR ] Unexpected exception happened.
[ ERROR ] Please contact Model Optimizer developers and forward the following information:
[ ERROR ] While validating ONNX node '<Node(Conv): 1377>':
Check 'input_shape[1].compatible(filters_shape[1])' failed at core/shape_inference/include/convolution_shape_inference.hpp:265:
While validating node 'v1::Convolution Convolution_8816 (1376[0]:f32{1,514,15,20}, context_module.final_conv.conv.weight[0]:f32{512,1024,1,1}) -> (dynamic...)' with friendly_name 'Convolution_8816':
Data batch channel count (514) does not match filter input channel count (1024).

[ ERROR ] Traceback (most recent call last):
File "/intel/openvino_2022.1.0.643/openvino_env/lib/python3.9/site-packages/openvino/tools/mo/main.py", line 533, in main
ret_code = driver(argv)
File "/intel/openvino_2022.1.0.643/openvino_env/lib/python3.9/site-packages/openvino/tools/mo/main.py", line 489, in driver
graph, ngraph_function = prepare_ir(argv)
File "/intel/openvino_2022.1.0.643/openvino_env/lib/python3.9/site-packages/openvino/tools/mo/main.py", line 394, in prepare_ir
ngraph_function = moc_pipeline(argv, moc_front_end)
File "/intel/openvino_2022.1.0.643/openvino_env/lib/python3.9/site-packages/openvino/tools/mo/moc_frontend/pipeline.py", line 147, in moc_pipeline
ngraph_function = moc_front_end.convert(input_model)
RuntimeError: While validating ONNX node '<Node(Conv): 1377>':
Check 'input_shape[1].compatible(filters_shape[1])' failed at core/shape_inference/include/convolution_shape_inference.hpp:265:
While validating node 'v1::Convolution Convolution_8816 (1376[0]:f32{1,514,15,20}, context_module.final_conv.conv.weight[0]:f32{512,1024,1,1}) -> (dynamic...)' with friendly_name 'Convolution_8816':
Data batch channel count (514) does not match filter input channel count (1024).


[ ERROR ] ---------------- END OF BUG REPORT --------------
-------------------------------------------------------------------------------------------------------------
The ESANet website is here.
https://github.com/TUI-NICR/ESANet

The ESANet model (PyTorch) can be downloaded here.
https://drive.google.com/uc?id=1C5-kJv4w3foicEudP3DAjdIXVuzUK7O8

You can download the onnx file here
https://11.gigafile.nu/0607-e5b5fa132bd8ed52b330ae575ed426581
20220523.zip

Similar issues
https://github.com/openvinotoolkit/openvino/issues/11733

 

please help me

0 Kudos
1 Solution
Yumi_ques
Novice
1,631 Views

TO:Wan_Intel

 

It seems that the ONNX model created with the Anaconda virtual environment active was the cause of the failure.
We were able to convert from an ONNX model to an IR file created with the OpenVINO virtual environment active, without the Anaconda virtual environment active.

The procedure is described for future reference.
----------
1. $source openvino_env/bin/activate
2. Clone the ESANet repository (in my case, directly under home)
3. $cd ~
4. $git clone https://github.com/TUI-NICR/ESANet
(Install the necessary packages directly with pip, without activating the anaconda virtual environment.
*I was missing matplotlib, cityscapesscripts in my environment.)
5. $pip3 install matplotlib cityscapesscripts

From then on, I was able to convert the file to an IR file by following the procedure given by Wan.
----------

Now that we have the IR model of ESANet, I close this question.
Thank you very much for your cooperation.

View solution in original post

6 Replies
Wan_Intel
Moderator
1,716 Views

Hi Yumi_ques,

Thanks for reaching out to us.

 

I encountered the same error: “RuntimeError: Data batch channel count (514) does not match filter input channel count (1024)” when using your ONNX file with Model Optimizer. May I know how you convert your PyTorch model into ONNX model?

 

For your information, I’m able to convert the ESANet PyTorch model to IR file. Please follow the steps below to convert the ESANet PyTorch model into Intermediate Representation (IR):


1.   Clone ESANet GitHub repository.

2.   Run model_to_onnx.py script to convert PyTorch model to ONNX model with the following command:

python model_to_onnx.py --last_ckpt <model.pth>

3.   Convert the ONNX model to IR with the following command:

mo --input_model <model.onnx>

 

 

Regards,

Wan


0 Kudos
Yumi_ques
Novice
1,690 Views

Thanks for the reply.

Convert IR files from PyTorch model
I tried it again, but
There is an error to make.

>May I know how you convert your PyTorch model into ONNX model?
The PyTorch to onnx file conversion was performed with the following command

python3 model_to_onnx.py --last_ckpt /ESANet/ESANet/weights/r34_NBt1D.pth


The log of the conversion from PyTorch to onnx is as follows.
---------------------------
Loaded NYUv2 dataset without files
Loaded NYUv2 dataset without files
/ESANet/ESANet/src/build_model.py:29: UserWarning: Argument --channels_decoder is ignored when --decoder_chanels_mode decreasing is set.
warnings.warn('Argument --channels_decoder is ignored when '
/ESANet/ESANet/src/models/resnet.py:101: UserWarning: parameters groups, base_width and norm_layer are ignored in NonBottleneck1D
warnings.warn('parameters groups, base_width and norm_layer are '
/ESANet/ESANet/src/models/model.py:163: UserWarning: for the context module the learned upsampling is not possible as the feature maps are not upscaled by the factor 2. We will use nearest neighbor instead.
warnings.warn('for the context module the learned upsampling is '
Device: cpu
ESANet(
(activation): ReLU(inplace=True)
(encoder_rgb): ResNet(
(conv1): Conv2d(3, 64, kernel_size=(7, 7), stride=(2, 2), padding=(3, 3), bias=False)
(bn1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(maxpool): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
(layer1): Sequential(
(0): NonBottleneck1D(
(conv3x1_1): Conv2d(64, 64, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(64, 64, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(64, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(64, 64, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(64, 64, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(64, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
(1): NonBottleneck1D(
(conv3x1_1): Conv2d(64, 64, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(64, 64, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(64, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(64, 64, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(64, 64, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(64, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
(2): NonBottleneck1D(
(conv3x1_1): Conv2d(64, 64, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(64, 64, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(64, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(64, 64, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(64, 64, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(64, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
)
(layer2): Sequential(
(0): NonBottleneck1D(
(conv3x1_1): Conv2d(64, 128, kernel_size=(3, 1), stride=(2, 1), padding=(1, 0))
(conv1x3_1): Conv2d(128, 128, kernel_size=(1, 3), stride=(1, 2), padding=(0, 1))
(bn1): BatchNorm2d(128, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(128, 128, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(128, 128, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(128, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
(downsample): Sequential(
(0): Conv2d(64, 128, kernel_size=(1, 1), stride=(2, 2), bias=False)
(1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
)
)
(1): NonBottleneck1D(
(conv3x1_1): Conv2d(128, 128, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(128, 128, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(128, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(128, 128, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(128, 128, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(128, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
(2): NonBottleneck1D(
(conv3x1_1): Conv2d(128, 128, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(128, 128, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(128, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(128, 128, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(128, 128, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(128, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
(3): NonBottleneck1D(
(conv3x1_1): Conv2d(128, 128, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(128, 128, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(128, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(128, 128, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(128, 128, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(128, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
)
(layer3): Sequential(
(0): NonBottleneck1D(
(conv3x1_1): Conv2d(128, 256, kernel_size=(3, 1), stride=(2, 1), padding=(1, 0))
(conv1x3_1): Conv2d(256, 256, kernel_size=(1, 3), stride=(1, 2), padding=(0, 1))
(bn1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(256, 256, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(256, 256, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
(downsample): Sequential(
(0): Conv2d(128, 256, kernel_size=(1, 1), stride=(2, 2), bias=False)
(1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
)
)
(1): NonBottleneck1D(
(conv3x1_1): Conv2d(256, 256, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(256, 256, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(256, 256, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(256, 256, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
(2): NonBottleneck1D(
(conv3x1_1): Conv2d(256, 256, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(256, 256, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(256, 256, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(256, 256, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
(3): NonBottleneck1D(
(conv3x1_1): Conv2d(256, 256, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(256, 256, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(256, 256, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(256, 256, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
(4): NonBottleneck1D(
(conv3x1_1): Conv2d(256, 256, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(256, 256, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(256, 256, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(256, 256, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
(5): NonBottleneck1D(
(conv3x1_1): Conv2d(256, 256, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(256, 256, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(256, 256, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(256, 256, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
)
(layer4): Sequential(
(0): NonBottleneck1D(
(conv3x1_1): Conv2d(256, 512, kernel_size=(3, 1), stride=(2, 1), padding=(1, 0))
(conv1x3_1): Conv2d(512, 512, kernel_size=(1, 3), stride=(1, 2), padding=(0, 1))
(bn1): BatchNorm2d(512, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(512, 512, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(512, 512, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(512, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
(downsample): Sequential(
(0): Conv2d(256, 512, kernel_size=(1, 1), stride=(2, 2), bias=False)
(1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
)
)
(1): NonBottleneck1D(
(conv3x1_1): Conv2d(512, 512, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(512, 512, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(512, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(512, 512, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(512, 512, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(512, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
(2): NonBottleneck1D(
(conv3x1_1): Conv2d(512, 512, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(512, 512, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(512, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(512, 512, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(512, 512, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(512, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
)
)
(encoder_depth): ResNet(
(conv1): Conv2d(1, 64, kernel_size=(7, 7), stride=(2, 2), padding=(3, 3), bias=False)
(bn1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(maxpool): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
(layer1): Sequential(
(0): NonBottleneck1D(
(conv3x1_1): Conv2d(64, 64, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(64, 64, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(64, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(64, 64, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(64, 64, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(64, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
(1): NonBottleneck1D(
(conv3x1_1): Conv2d(64, 64, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(64, 64, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(64, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(64, 64, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(64, 64, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(64, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
(2): NonBottleneck1D(
(conv3x1_1): Conv2d(64, 64, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(64, 64, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(64, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(64, 64, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(64, 64, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(64, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
)
(layer2): Sequential(
(0): NonBottleneck1D(
(conv3x1_1): Conv2d(64, 128, kernel_size=(3, 1), stride=(2, 1), padding=(1, 0))
(conv1x3_1): Conv2d(128, 128, kernel_size=(1, 3), stride=(1, 2), padding=(0, 1))
(bn1): BatchNorm2d(128, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(128, 128, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(128, 128, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(128, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
(downsample): Sequential(
(0): Conv2d(64, 128, kernel_size=(1, 1), stride=(2, 2), bias=False)
(1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
)
)
(1): NonBottleneck1D(
(conv3x1_1): Conv2d(128, 128, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(128, 128, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(128, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(128, 128, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(128, 128, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(128, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
(2): NonBottleneck1D(
(conv3x1_1): Conv2d(128, 128, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(128, 128, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(128, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(128, 128, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(128, 128, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(128, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
(3): NonBottleneck1D(
(conv3x1_1): Conv2d(128, 128, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(128, 128, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(128, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(128, 128, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(128, 128, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(128, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
)
(layer3): Sequential(
(0): NonBottleneck1D(
(conv3x1_1): Conv2d(128, 256, kernel_size=(3, 1), stride=(2, 1), padding=(1, 0))
(conv1x3_1): Conv2d(256, 256, kernel_size=(1, 3), stride=(1, 2), padding=(0, 1))
(bn1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(256, 256, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(256, 256, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
(downsample): Sequential(
(0): Conv2d(128, 256, kernel_size=(1, 1), stride=(2, 2), bias=False)
(1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
)
)
(1): NonBottleneck1D(
(conv3x1_1): Conv2d(256, 256, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(256, 256, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(256, 256, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(256, 256, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
(2): NonBottleneck1D(
(conv3x1_1): Conv2d(256, 256, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(256, 256, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(256, 256, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(256, 256, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
(3): NonBottleneck1D(
(conv3x1_1): Conv2d(256, 256, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(256, 256, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(256, 256, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(256, 256, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
(4): NonBottleneck1D(
(conv3x1_1): Conv2d(256, 256, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(256, 256, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(256, 256, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(256, 256, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
(5): NonBottleneck1D(
(conv3x1_1): Conv2d(256, 256, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(256, 256, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(256, 256, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(256, 256, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
)
(layer4): Sequential(
(0): NonBottleneck1D(
(conv3x1_1): Conv2d(256, 512, kernel_size=(3, 1), stride=(2, 1), padding=(1, 0))
(conv1x3_1): Conv2d(512, 512, kernel_size=(1, 3), stride=(1, 2), padding=(0, 1))
(bn1): BatchNorm2d(512, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(512, 512, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(512, 512, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(512, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
(downsample): Sequential(
(0): Conv2d(256, 512, kernel_size=(1, 1), stride=(2, 2), bias=False)
(1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
)
)
(1): NonBottleneck1D(
(conv3x1_1): Conv2d(512, 512, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(512, 512, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(512, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(512, 512, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(512, 512, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(512, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
(2): NonBottleneck1D(
(conv3x1_1): Conv2d(512, 512, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(512, 512, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(512, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(512, 512, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(512, 512, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(512, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
)
)
(se_layer0): SqueezeAndExciteFusionAdd(
(se_rgb): SqueezeAndExcitation(
(fc): Sequential(
(0): Conv2d(64, 4, kernel_size=(1, 1), stride=(1, 1))
(1): ReLU(inplace=True)
(2): Conv2d(4, 64, kernel_size=(1, 1), stride=(1, 1))
(3): Sigmoid()
)
)
(se_depth): SqueezeAndExcitation(
(fc): Sequential(
(0): Conv2d(64, 4, kernel_size=(1, 1), stride=(1, 1))
(1): ReLU(inplace=True)
(2): Conv2d(4, 64, kernel_size=(1, 1), stride=(1, 1))
(3): Sigmoid()
)
)
)
(se_layer1): SqueezeAndExciteFusionAdd(
(se_rgb): SqueezeAndExcitation(
(fc): Sequential(
(0): Conv2d(64, 4, kernel_size=(1, 1), stride=(1, 1))
(1): ReLU(inplace=True)
(2): Conv2d(4, 64, kernel_size=(1, 1), stride=(1, 1))
(3): Sigmoid()
)
)
(se_depth): SqueezeAndExcitation(
(fc): Sequential(
(0): Conv2d(64, 4, kernel_size=(1, 1), stride=(1, 1))
(1): ReLU(inplace=True)
(2): Conv2d(4, 64, kernel_size=(1, 1), stride=(1, 1))
(3): Sigmoid()
)
)
)
(se_layer2): SqueezeAndExciteFusionAdd(
(se_rgb): SqueezeAndExcitation(
(fc): Sequential(
(0): Conv2d(128, 8, kernel_size=(1, 1), stride=(1, 1))
(1): ReLU(inplace=True)
(2): Conv2d(8, 128, kernel_size=(1, 1), stride=(1, 1))
(3): Sigmoid()
)
)
(se_depth): SqueezeAndExcitation(
(fc): Sequential(
(0): Conv2d(128, 8, kernel_size=(1, 1), stride=(1, 1))
(1): ReLU(inplace=True)
(2): Conv2d(8, 128, kernel_size=(1, 1), stride=(1, 1))
(3): Sigmoid()
)
)
)
(se_layer3): SqueezeAndExciteFusionAdd(
(se_rgb): SqueezeAndExcitation(
(fc): Sequential(
(0): Conv2d(256, 16, kernel_size=(1, 1), stride=(1, 1))
(1): ReLU(inplace=True)
(2): Conv2d(16, 256, kernel_size=(1, 1), stride=(1, 1))
(3): Sigmoid()
)
)
(se_depth): SqueezeAndExcitation(
(fc): Sequential(
(0): Conv2d(256, 16, kernel_size=(1, 1), stride=(1, 1))
(1): ReLU(inplace=True)
(2): Conv2d(16, 256, kernel_size=(1, 1), stride=(1, 1))
(3): Sigmoid()
)
)
)
(se_layer4): SqueezeAndExciteFusionAdd(
(se_rgb): SqueezeAndExcitation(
(fc): Sequential(
(0): Conv2d(512, 32, kernel_size=(1, 1), stride=(1, 1))
(1): ReLU(inplace=True)
(2): Conv2d(32, 512, kernel_size=(1, 1), stride=(1, 1))
(3): Sigmoid()
)
)
(se_depth): SqueezeAndExcitation(
(fc): Sequential(
(0): Conv2d(512, 32, kernel_size=(1, 1), stride=(1, 1))
(1): ReLU(inplace=True)
(2): Conv2d(32, 512, kernel_size=(1, 1), stride=(1, 1))
(3): Sigmoid()
)
)
)
(skip_layer1): Sequential(
(0): ConvBNAct(
(conv): Conv2d(64, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
(bn): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
)
)
(skip_layer2): Sequential(
(0): ConvBNAct(
(conv): Conv2d(128, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)
(bn): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
)
)
(skip_layer3): Sequential(
(0): ConvBNAct(
(conv): Conv2d(256, 512, kernel_size=(1, 1), stride=(1, 1), bias=False)
(bn): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
)
)
(context_module): PyramidPoolingModule(
(features): ModuleList(
(0): Sequential(
(0): AdaptiveAvgPool2d(output_size=1)
(1): ConvBNAct(
(conv): Conv2d(512, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)
(bn): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
)
)
(1): Sequential(
(0): AdaptiveAvgPool2d(output_size=5)
(1): ConvBNAct(
(conv): Conv2d(512, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)
(bn): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
)
)
)
(final_conv): ConvBNAct(
(conv): Conv2d(1024, 512, kernel_size=(1, 1), stride=(1, 1), bias=False)
(bn): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
)
)
(decoder): Decoder(
(decoder_module_1): DecoderModule(
(conv3x3): ConvBNAct(
(conv): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
(bn): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
)
(decoder_blocks): Sequential(
(0): NonBottleneck1D(
(conv3x1_1): Conv2d(512, 512, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(512, 512, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(512, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(512, 512, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(512, 512, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(512, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
(1): NonBottleneck1D(
(conv3x1_1): Conv2d(512, 512, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(512, 512, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(512, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(512, 512, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(512, 512, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(512, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
(2): NonBottleneck1D(
(conv3x1_1): Conv2d(512, 512, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(512, 512, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(512, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(512, 512, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(512, 512, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(512, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
)
(upsample): Upsample(
(pad): Identity()
(conv): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=512)
)
(side_output): Conv2d(512, 40, kernel_size=(1, 1), stride=(1, 1))
)
(decoder_module_2): DecoderModule(
(conv3x3): ConvBNAct(
(conv): Conv2d(512, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
(bn): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
)
(decoder_blocks): Sequential(
(0): NonBottleneck1D(
(conv3x1_1): Conv2d(256, 256, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(256, 256, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(256, 256, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(256, 256, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
(1): NonBottleneck1D(
(conv3x1_1): Conv2d(256, 256, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(256, 256, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(256, 256, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(256, 256, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
(2): NonBottleneck1D(
(conv3x1_1): Conv2d(256, 256, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(256, 256, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(256, 256, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(256, 256, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
)
(upsample): Upsample(
(pad): Identity()
(conv): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=256)
)
(side_output): Conv2d(256, 40, kernel_size=(1, 1), stride=(1, 1))
)
(decoder_module_3): DecoderModule(
(conv3x3): ConvBNAct(
(conv): Conv2d(256, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
(bn): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
)
(decoder_blocks): Sequential(
(0): NonBottleneck1D(
(conv3x1_1): Conv2d(128, 128, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(128, 128, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(128, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(128, 128, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(128, 128, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(128, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
(1): NonBottleneck1D(
(conv3x1_1): Conv2d(128, 128, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(128, 128, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(128, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(128, 128, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(128, 128, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(128, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
(2): NonBottleneck1D(
(conv3x1_1): Conv2d(128, 128, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_1): Conv2d(128, 128, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn1): BatchNorm2d(128, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(act): ReLU(inplace=True)
(conv3x1_2): Conv2d(128, 128, kernel_size=(3, 1), stride=(1, 1), padding=(1, 0))
(conv1x3_2): Conv2d(128, 128, kernel_size=(1, 3), stride=(1, 1), padding=(0, 1))
(bn2): BatchNorm2d(128, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)
(dropout): Dropout2d(p=0, inplace=False)
)
)
(upsample): Upsample(
(pad): Identity()
(conv): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=128)
)
(side_output): Conv2d(128, 40, kernel_size=(1, 1), stride=(1, 1))
)
(conv_out): Conv2d(128, 40, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(upsample1): Upsample(
(pad): Identity()
(conv): Conv2d(40, 40, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=40)
)
(upsample2): Upsample(
(pad): Identity()
(conv): Conv2d(40, 40, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=40)
)
)
)
/ESANet/ESANet/src/models/model.py:405: 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!
size = (int(x.shape[2]*2), int(x.shape[3]*2))
---------------------------

Thank you,
Yumi_ques

0 Kudos
Wan_Intel
Moderator
1,687 Views

Hi Yumi_ques,

By default, the ONNX model will be saved to the “onnx_models” directory. Could you please check on your end, did the ONNX model saved in that directory?

 

 

Regards,

Wan


0 Kudos
Yumi_ques
Novice
1,668 Views

To Wan_Intel

 

Thanks for the reply.

Yes. I have verified that model.onnx is stored in the "onnx_models" directory.

 

Thank you,
Yumi_ques

Yumi_ques
Novice
1,632 Views

TO:Wan_Intel

 

It seems that the ONNX model created with the Anaconda virtual environment active was the cause of the failure.
We were able to convert from an ONNX model to an IR file created with the OpenVINO virtual environment active, without the Anaconda virtual environment active.

The procedure is described for future reference.
----------
1. $source openvino_env/bin/activate
2. Clone the ESANet repository (in my case, directly under home)
3. $cd ~
4. $git clone https://github.com/TUI-NICR/ESANet
(Install the necessary packages directly with pip, without activating the anaconda virtual environment.
*I was missing matplotlib, cityscapesscripts in my environment.)
5. $pip3 install matplotlib cityscapesscripts

From then on, I was able to convert the file to an IR file by following the procedure given by Wan.
----------

Now that we have the IR model of ESANet, I close this question.
Thank you very much for your cooperation.

Wan_Intel
Moderator
1,603 Views

Hi Yumi_ques,

Thanks for sharing your answer in the community.

This thread will no longer be monitored since you have found the solution. 

If you need any additional information from Intel, please submit a new question.

 

 

Regards,

Wan

 

0 Kudos
Reply