[IE TESTS] Added single layer test "Ceiling" (#1271)

This commit is contained in:
Roman Lyamin 2020-07-10 10:49:50 +03:00 committed by GitHub
parent 2537174a43
commit 8e368c5e81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 30 additions and 5 deletions

View File

@ -580,6 +580,7 @@ Program::LayerType Program::LayerTypeFromStr(const std::string &str) {
{ "Atanh" , Atanh },
{ "Floor" , Floor },
{ "Ceil" , Ceil },
{ "Ceiling" , Ceiling },
{ "Erf" , Erf },
{ "HardSigmoid" , HardSigmoid },
{ "Log" , Log },
@ -1150,6 +1151,7 @@ void Program::CreateSingleLayerPrimitive(cldnn::topology& topology, InferenceEng
case Atanh:
case Floor:
case Ceil:
case Ceiling:
case Erf:
case HardSigmoid:
case Log:
@ -2887,6 +2889,11 @@ void Program::CreateActivationPrimitive(cldnn::topology& topology, InferenceEngi
func = cldnn::activation_func::ceil;
break;
}
case Ceiling:
{
func = cldnn::activation_func::ceil;
break;
}
case Erf:
{
func = cldnn::activation_func::erf;

View File

@ -191,6 +191,7 @@ public:
TopK,
Floor,
Ceil,
Ceiling,
Erf,
HardSigmoid,
Log,

View File

@ -45,7 +45,8 @@ const std::vector<ActivationTypes> activationTypes = {
Elu,
Erf,
HardSigmoid,
Selu
Selu,
Ceiling
};
const auto basicCases = ::testing::Combine(

View File

@ -44,5 +44,7 @@ std::vector<std::string> disabledTestPatterns() {
R"(.*ConvertLikeLayerTest.*)",
//TODO: Issue: 34516
R"(.*ConvertLayerTest.*)",
//TODO: Issue: 34805
R"(.*ActivationLayerTest.*Ceiling.*)"
};
}
}

View File

@ -40,7 +40,8 @@ const std::vector<ActivationTypes> activationTypes = {
Elu,
Erf,
HardSigmoid,
Selu
Selu,
Ceiling
};
const auto basicCases = ::testing::Combine(

View File

@ -56,7 +56,17 @@ static std::map<ngraph::helpers::ActivationTypes, std::string> activationNames =
{ngraph::helpers::ActivationTypes::Elu, "Elu"},
{ngraph::helpers::ActivationTypes::Erf, "Erf"},
{ngraph::helpers::ActivationTypes::HardSigmoid, "HardSigmoid"},
{ngraph::helpers::ActivationTypes::Selu, "Selu"}
{ngraph::helpers::ActivationTypes::Selu, "Selu"},
{ngraph::helpers::ActivationTypes::Sigmoid, "Sigmoid"},
{ngraph::helpers::ActivationTypes::Tanh, "Tanh"},
{ngraph::helpers::ActivationTypes::Relu, "Relu"},
{ngraph::helpers::ActivationTypes::LeakyRelu, "LeakyRelu"},
{ngraph::helpers::ActivationTypes::Exp, "Exp"},
{ngraph::helpers::ActivationTypes::Log, "Log"},
{ngraph::helpers::ActivationTypes::Sign, "Sign"},
{ngraph::helpers::ActivationTypes::Abs, "Abs"},
{ngraph::helpers::ActivationTypes::Gelu, "Gelu"},
{ngraph::helpers::ActivationTypes::Ceiling, "Ceiling"}
};
typedef std::tuple<

View File

@ -105,7 +105,8 @@ enum ActivationTypes {
Elu,
Erf,
HardSigmoid,
Selu
Selu,
Ceiling
};
enum EltwiseTypes {

View File

@ -79,6 +79,8 @@ std::shared_ptr<ngraph::Node> makeActivation(const ngraph::Output<Node> &in,
return std::make_shared<ngraph::op::HardSigmoid>(in, hard_sigmoid_alpha, hard_sigmoid_beta);
case ngraph::helpers::ActivationTypes::Selu:
return std::make_shared<ngraph::op::Selu>(in, selu_alpha, selu_lambda);
case ngraph::helpers::ActivationTypes::Ceiling:
return std::make_shared<ngraph::op::Ceiling>(in);
default:
throw std::runtime_error("Can't create layer for this activation type");
}