Commit 6dfe2ddc authored by Diego's avatar Diego Committed by Alexander Alekhin

Merge pull request #14959 from dvd42:onnx_clip

* onnx clip operation
parent fee87c5f
...@@ -530,6 +530,13 @@ void ONNXImporter::populateNet(Net dstNet) ...@@ -530,6 +530,13 @@ void ONNXImporter::populateNet(Net dstNet)
layerParams.type = "Power"; layerParams.type = "Power";
} }
} }
else if (layer_type == "Clip")
{
layerParams.type = "ReLU6";
replaceLayerParam(layerParams, "min", "min_value");
replaceLayerParam(layerParams, "max", "max_value");
}
else if (layer_type == "LeakyRelu") else if (layer_type == "LeakyRelu")
{ {
layerParams.type = "ReLU"; layerParams.type = "ReLU";
......
...@@ -136,6 +136,11 @@ TEST_P(Test_ONNX_layers, ReLU) ...@@ -136,6 +136,11 @@ TEST_P(Test_ONNX_layers, ReLU)
testONNXModels("ReLU"); testONNXModels("ReLU");
} }
TEST_P(Test_ONNX_layers, Clip)
{
testONNXModels("clip", npy);
}
TEST_P(Test_ONNX_layers, MaxPooling_Sigmoid) TEST_P(Test_ONNX_layers, MaxPooling_Sigmoid)
{ {
testONNXModels("maxpooling_sigmoid"); testONNXModels("maxpooling_sigmoid");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment