Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
835ecad9
Commit
835ecad9
authored
Oct 24, 2018
by
tsocha
Committed by
Robert Kimball
Oct 24, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable Trigonometric ops (#1879)
parent
a804c3d7
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
282 additions
and
0 deletions
+282
-0
CMakeLists.txt
src/ngraph/frontend/onnx_import/CMakeLists.txt
+6
-0
acos.hpp
src/ngraph/frontend/onnx_import/op/acos.hpp
+44
-0
asin.hpp
src/ngraph/frontend/onnx_import/op/asin.hpp
+44
-0
atan.hpp
src/ngraph/frontend/onnx_import/op/atan.hpp
+44
-0
cos.hpp
src/ngraph/frontend/onnx_import/op/cos.hpp
+44
-0
sin.hpp
src/ngraph/frontend/onnx_import/op/sin.hpp
+44
-0
tan.hpp
src/ngraph/frontend/onnx_import/op/tan.hpp
+44
-0
ops_bridge.cpp
src/ngraph/frontend/onnx_import/ops_bridge.cpp
+12
-0
No files found.
src/ngraph/frontend/onnx_import/CMakeLists.txt
View file @
835ecad9
...
...
@@ -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
...
...
src/ngraph/frontend/onnx_import/op/acos.hpp
0 → 100644
View file @
835ecad9
//*****************************************************************************
// 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
src/ngraph/frontend/onnx_import/op/asin.hpp
0 → 100644
View file @
835ecad9
//*****************************************************************************
// 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
src/ngraph/frontend/onnx_import/op/atan.hpp
0 → 100644
View file @
835ecad9
//*****************************************************************************
// 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
src/ngraph/frontend/onnx_import/op/cos.hpp
0 → 100644
View file @
835ecad9
//*****************************************************************************
// 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
src/ngraph/frontend/onnx_import/op/sin.hpp
0 → 100644
View file @
835ecad9
//*****************************************************************************
// 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
src/ngraph/frontend/onnx_import/op/tan.hpp
0 → 100644
View file @
835ecad9
//*****************************************************************************
// 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
src/ngraph/frontend/onnx_import/ops_bridge.cpp
View file @
835ecad9
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment