From 6617fee5f63feacc3f1b5dc9dca66e393a76e534 Mon Sep 17 00:00:00 2001 From: Mathieu Poumeyrol Date: Tue, 8 Aug 2023 15:18:09 +0200 Subject: [PATCH] fix padding declutter --- core/src/ops/cnn/conv/unary.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/ops/cnn/conv/unary.rs b/core/src/ops/cnn/conv/unary.rs index 8c384a597f..5c32cf79b4 100644 --- a/core/src/ops/cnn/conv/unary.rs +++ b/core/src/ops/cnn/conv/unary.rs @@ -653,7 +653,7 @@ impl ConvUnary { return Ok(None); }; let shape = self.pool_spec.data_format.shape(&model.outlet_fact(node.inputs[0])?.shape)?; - if value.is_zero()? + if !value.is_zero()? || (self.pool_spec.data_format.has_n() && pad.pads[0] != (0, 0)) || pad.pads[shape.c_axis()] != (0, 0) {