提交 6dfe2ddc 编写于 作者: D Diego 提交者: Alexander Alekhin

Merge pull request #14959 from dvd42:onnx_clip

* onnx clip operation
上级 fee87c5f
......@@ -530,6 +530,13 @@ void ONNXImporter::populateNet(Net dstNet)
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")
{
layerParams.type = "ReLU";
......
......@@ -136,6 +136,11 @@ TEST_P(Test_ONNX_layers, ReLU)
testONNXModels("ReLU");
}
TEST_P(Test_ONNX_layers, Clip)
{
testONNXModels("clip", npy);
}
TEST_P(Test_ONNX_layers, MaxPooling_Sigmoid)
{
testONNXModels("maxpooling_sigmoid");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册