Merge pull request #19474 from aryanshomray:darknet_tanh

This commit is contained in:
Alexander Alekhin 2021-02-17 17:10:44 +00:00
commit 8d21c84e7d
2 changed files with 9 additions and 0 deletions

View File

@ -241,6 +241,10 @@ namespace cv {
{
activation_param.type = "Sigmoid";
}
else if (type == "tanh")
{
activation_param.type = "TanH";
}
else
{
CV_Error(cv::Error::StsParseError, "Unsupported activation: " + type);

View File

@ -702,6 +702,11 @@ TEST_P(Test_Darknet_layers, mish)
testDarknetLayer("mish", true);
}
TEST_P(Test_Darknet_layers, tanh)
{
testDarknetLayer("tanh");
}
TEST_P(Test_Darknet_layers, avgpool_softmax)
{
testDarknetLayer("avgpool_softmax");