Skip to content

Commit 7717c7b

Browse files
committed
Account for the edge case where there is only one input channel
1 parent 5249fb4 commit 7717c7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Deeploy/CommonExtensions/OptimizationPasses/TopologyOptimizationPasses/LoweringOptimizationPasses.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def _isDepthwise(node: gs.Node) -> bool:
3030
spatialDims = len(node.inputs[1].shape) - 2
3131
shapeIn = node.inputs[0].shape
3232
chIn = shapeIn[-spatialDims - 1] if channels_first else shapeIn[-1]
33-
return node.attrs.get("group", 1) == chIn
33+
return chIn != 1 and node.attrs.get("group", 1) == chIn
3434

3535

3636
def _createReshape(tensorIn: gs.Tensor,

0 commit comments

Comments
 (0)