add zero attribute test for tanh op (#5427)
* add zero attribute test for tanh op * apply review suggestion Co-authored-by: Patryk Elszkowski <patryk.elszkowki@intel.com>
This commit is contained in:
parent
f089c40bb4
commit
3de41ec50a
@ -258,6 +258,7 @@ set(SRC
|
||||
visitors/op/squeeze.cpp
|
||||
visitors/op/sqrt.cpp
|
||||
visitors/op/strided_slice.cpp
|
||||
visitors/op/tanh.cpp
|
||||
visitors/op/topk.cpp
|
||||
visitors/op/transpose.cpp
|
||||
uint4.cpp
|
||||
|
27
ngraph/test/visitors/op/tanh.cpp
Normal file
27
ngraph/test/visitors/op/tanh.cpp
Normal file
@ -0,0 +1,27 @@
|
||||
// Copyright (C) 2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "ngraph/ngraph.hpp"
|
||||
#include "ngraph/op/util/attr_types.hpp"
|
||||
#include "ngraph/opsets/opset1.hpp"
|
||||
|
||||
#include "util/visitor.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
using ngraph::test::NodeBuilder;
|
||||
|
||||
TEST(attributes, tanh_op)
|
||||
{
|
||||
NodeBuilder::get_ops().register_factory<op::Tanh>();
|
||||
const auto data_node = make_shared<op::Parameter>(element::f32, Shape{1});
|
||||
const auto tanh = make_shared<op::Tanh>(data_node);
|
||||
|
||||
const NodeBuilder builder(tanh);
|
||||
const auto tanh_attr_number = 0;
|
||||
|
||||
EXPECT_EQ(builder.get_value_map_size(), tanh_attr_number);
|
||||
}
|
Loading…
Reference in New Issue
Block a user