Skip to content

Commit abe5aa4

Browse files
authored
Merge pull request #959 from AL3708/fix/conv-depthwise-stale-shape
Fix depthwise Conv detection after NCHW->NHWC input transpose (Legacy converter)
2 parents 2c0cb01 + 8b04689 commit abe5aa4

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

onnx2tf/ops/Conv.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,10 @@ def make_node(
280280
print(error_msg)
281281
assert False, error_msg
282282

283+
# Refresh after the NCHW->NHWC workaround above: the depthwise test below reads
284+
# input_tensor_shape[-1], so a stale shape turns depthwise convs into grouped convs.
285+
input_tensor_shape = input_tensor.shape
286+
283287
# DepthwiseConv2D
284288
# 1. rank=4
285289
# 2. group>1

0 commit comments

Comments
 (0)