Skip to content

Conversion Problem with SSD MobileNetv2 MNAS - Depthwise Convolutions #1100

@phager90

Description

@phager90

Describe the bug
Some depthwise convolutions are not converted properly in SSD MobileNetv2 MNAS.

Urgency
none

To Reproduce
Describe steps/code to reproduce the behavior:
Download SSD MobileNetv2 MNASNET: http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v2_mnasfpn_shared_box_predictor_320x320_coco_sync_2020_05_18.tar.gz
Convert with:

python -m tf2onnx.convert --graphdef ./frozen_inference_graph.pb --output out.onnx \
        --fold_const --opset 10 \
        --inputs normalized_input_image_tensor:0 \
        --outputs raw_outputs/class_predictions:0,raw_outputs/box_encodings:0

Expected behavior
Depthwise convolutions on heads (frozen graph file):
image

Group properly not correctly set on out.onnx:
image

Additional context
Output is quite erratic. On some depthwise convolutions is it correct, on others not. It could be related to the fact that the weights are broadcasted from a static node to multiple convolutions.

It looks that only one of the Depthwise Conv receiving the weights seems to be converted correctly:
image

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions