Commit 835ecad9 authored by tsocha's avatar tsocha Committed by Robert Kimball

Enable Trigonometric ops (#1879)

parent a804c3d7
......@@ -35,8 +35,11 @@ add_library(onnx_import STATIC
core/tensor.hpp
core/value_info.hpp
exceptions.hpp
op/acos.hpp
op/add.hpp
op/and.hpp
op/asin.hpp
op/atan.hpp
op/average_pool.cpp
op/average_pool.hpp
op/batch_norm.cpp
......@@ -46,6 +49,7 @@ add_library(onnx_import STATIC
op/ceil.hpp
op/clip.cpp
op/clip.hpp
op/cos.hpp
op/concat.cpp
op/concat.hpp
op/constant.cpp
......@@ -103,6 +107,7 @@ add_library(onnx_import STATIC
op/shape.hpp
op/shape.cpp
op/sigmoid.hpp
op/sin.hpp
op/slice.cpp
op/slice.hpp
op/softmax.cpp
......@@ -118,6 +123,7 @@ add_library(onnx_import STATIC
op/squeeze.hpp
op/sub.hpp
op/sum.hpp
op/tan.hpp
op/tanh.hpp
op/thresholded_relu.cpp
op/thresholded_relu.hpp
......
//*****************************************************************************
// Copyright 2017-2018 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//*****************************************************************************
#pragma once
#include <memory>
#include "ngraph/node_vector.hpp"
#include "ngraph/op/acos.hpp"
#include "core/node.hpp"
namespace ngraph
{
namespace onnx_import
{
namespace op
{
namespace set_1
{
inline NodeVector acos(const Node& node)
{
return {std::make_shared<ngraph::op::Acos>(node.get_ng_inputs().at(0))};
}
} // namespace set_1
} //namespace op
} // namespace onnx_import
} // namespace ngraph
//*****************************************************************************
// Copyright 2017-2018 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//*****************************************************************************
#pragma once
#include <memory>
#include "ngraph/node_vector.hpp"
#include "ngraph/op/asin.hpp"
#include "core/node.hpp"
namespace ngraph
{
namespace onnx_import
{
namespace op
{
namespace set_1
{
inline NodeVector asin(const Node& node)
{
return {std::make_shared<ngraph::op::Asin>(node.get_ng_inputs().at(0))};
}
} // namespace set_1
} //namespace op
} // namespace onnx_import
} // namespace ngraph
//*****************************************************************************
// Copyright 2017-2018 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//*****************************************************************************
#pragma once
#include <memory>
#include "ngraph/node_vector.hpp"
#include "ngraph/op/atan.hpp"
#include "core/node.hpp"
namespace ngraph
{
namespace onnx_import
{
namespace op
{
namespace set_1
{
inline NodeVector atan(const Node& node)
{
return {std::make_shared<ngraph::op::Atan>(node.get_ng_inputs().at(0))};
}
} // namespace set_1
} //namespace op
} // namespace onnx_import
} // namespace ngraph
//*****************************************************************************
// Copyright 2017-2018 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//*****************************************************************************
#pragma once
#include <memory>
#include "ngraph/node_vector.hpp"
#include "ngraph/op/cos.hpp"
#include "core/node.hpp"
namespace ngraph
{
namespace onnx_import
{
namespace op
{
namespace set_1
{
inline NodeVector cos(const Node& node)
{
return {std::make_shared<ngraph::op::Cos>(node.get_ng_inputs().at(0))};
}
} // namespace set_1
} //namespace op
} // namespace onnx_import
} // namespace ngraph
//*****************************************************************************
// Copyright 2017-2018 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//*****************************************************************************
#pragma once
#include <memory>
#include "ngraph/node_vector.hpp"
#include "ngraph/op/sin.hpp"
#include "core/node.hpp"
namespace ngraph
{
namespace onnx_import
{
namespace op
{
namespace set_1
{
inline NodeVector sin(const Node& node)
{
return {std::make_shared<ngraph::op::Sin>(node.get_ng_inputs().at(0))};
}
} // namespace set_1
} //namespace op
} // namespace onnx_import
} // namespace ngraph
//*****************************************************************************
// Copyright 2017-2018 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//*****************************************************************************
#pragma once
#include <memory>
#include "ngraph/node_vector.hpp"
#include "ngraph/op/tan.hpp"
#include "core/node.hpp"
namespace ngraph
{
namespace onnx_import
{
namespace op
{
namespace set_1
{
inline NodeVector tan(const Node& node)
{
return {std::make_shared<ngraph::op::Tan>(node.get_ng_inputs().at(0))};
}
} // namespace set_1
} //namespace op
} // namespace onnx_import
} // namespace ngraph
......@@ -22,8 +22,11 @@
#include "core/attribute.hpp"
#include "op/abs.hpp"
#include "op/acos.hpp"
#include "op/add.hpp"
#include "op/and.hpp"
#include "op/asin.hpp"
#include "op/atan.hpp"
#include "op/average_pool.hpp"
#include "op/batch_norm.hpp"
#include "op/cast.hpp"
......@@ -32,6 +35,7 @@
#include "op/concat.hpp"
#include "op/constant.hpp"
#include "op/conv.hpp"
#include "op/cos.hpp"
#include "op/div.hpp"
#include "op/elu.hpp"
#include "op/equal.hpp"
......@@ -67,6 +71,7 @@
#include "op/selu.hpp"
#include "op/shape.hpp"
#include "op/sigmoid.hpp"
#include "op/sin.hpp"
#include "op/slice.hpp"
#include "op/softmax.hpp"
#include "op/softplus.hpp"
......@@ -76,6 +81,7 @@
#include "op/squeeze.hpp"
#include "op/sub.hpp"
#include "op/sum.hpp"
#include "op/tan.hpp"
#include "op/tanh.hpp"
#include "op/thresholded_relu.hpp"
#include "op/transpose.hpp"
......@@ -136,8 +142,11 @@ namespace ngraph
OperatorsBridge::OperatorsBridge()
{
REGISTER_OPERATOR("Abs", 1, abs);
REGISTER_OPERATOR("Acos", 1, acos);
REGISTER_OPERATOR("Add", 1, add);
REGISTER_OPERATOR("And", 1, logical_and);
REGISTER_OPERATOR("Asin", 1, asin);
REGISTER_OPERATOR("Atan", 1, atan);
REGISTER_OPERATOR("AveragePool", 1, average_pool);
REGISTER_OPERATOR("BatchNormalization", 1, batch_norm);
REGISTER_OPERATOR("Cast", 1, cast);
......@@ -146,6 +155,7 @@ namespace ngraph
REGISTER_OPERATOR("Concat", 1, concat);
REGISTER_OPERATOR("Constant", 1, constant);
REGISTER_OPERATOR("Conv", 1, conv);
REGISTER_OPERATOR("Cos", 1, cos);
REGISTER_OPERATOR("Div", 1, div);
REGISTER_OPERATOR("Dropout", 1, identity);
REGISTER_OPERATOR("Elu", 1, elu);
......@@ -191,6 +201,7 @@ namespace ngraph
REGISTER_OPERATOR("Selu", 1, selu);
REGISTER_OPERATOR("Shape", 1, shape);
REGISTER_OPERATOR("Sigmoid", 1, sigmoid);
REGISTER_OPERATOR("Sin", 1, sin);
REGISTER_OPERATOR("Slice", 1, slice);
REGISTER_OPERATOR("Softmax", 1, softmax);
REGISTER_OPERATOR("Softplus", 1, softplus);
......@@ -200,6 +211,7 @@ namespace ngraph
REGISTER_OPERATOR("Squeeze", 1, squeeze);
REGISTER_OPERATOR("Sub", 1, sub);
REGISTER_OPERATOR("Sum", 1, sum);
REGISTER_OPERATOR("Tan", 1, tan);
REGISTER_OPERATOR("Tanh", 1, tanh);
REGISTER_OPERATOR("ThresholdedRelu", 1, thresholded_relu);
REGISTER_OPERATOR("Transpose", 1, transpose);
......
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