Skip to content

Commit 2ea7269

Browse files
committed
Merge pull request opencv#18431 from zhuqiang00099:fix-darknet_relu
2 parents 969b550 + a968ead commit 2ea7269

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/dnn/src/darknet/darknet_io.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -984,8 +984,8 @@ namespace cv {
984984
}
985985

986986
std::string activation = getParam<std::string>(layer_params, "activation", "linear");
987-
if(activation == "leaky" || activation == "swish" || activation == "mish" || activation == "logistic")
988-
++cv_layers_counter; // For ReLU, Swish, Mish, Sigmoid
987+
if (activation != "linear")
988+
++cv_layers_counter; // For ReLU, Swish, Mish, Sigmoid, etc
989989

990990
if(!darknet_layers_counter)
991991
tensor_shape.resize(1);

0 commit comments

Comments
 (0)