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
15d743f1
Commit
15d743f1
authored
Jul 04, 2018
by
Artur Wojcik
Committed by
Michał Karzyński
Jul 04, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ONNX] add 'Add' operator (#1192)
parent
08cabb12
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
1 deletion
+43
-1
CMakeLists.txt
src/ngraph/frontend/onnx_import/CMakeLists.txt
+1
-0
add.hpp
src/ngraph/frontend/onnx_import/op/add.hpp
+39
-0
ops_bridge.cpp
src/ngraph/frontend/onnx_import/ops_bridge.cpp
+3
-1
No files found.
src/ngraph/frontend/onnx_import/CMakeLists.txt
View file @
15d743f1
...
...
@@ -39,6 +39,7 @@ add_library(onnx_import STATIC
model.hpp
node.cpp
node.hpp
op/add.hpp
ops_bridge.cpp
ops_bridge.hpp
tensor.hpp
...
...
src/ngraph/frontend/onnx_import/op/add.hpp
0 → 100644
View file @
15d743f1
/*******************************************************************************
* 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 "ngraph/frontend/onnx_import/node.hpp"
#include "ngraph/node_vector.hpp"
#include "ngraph/op/add.hpp"
namespace
ngraph
{
namespace
onnx_import
{
namespace
op
{
inline
NodeVector
add
(
const
Node
&
node
)
{
NodeVector
ng_inputs
{
node
.
get_ng_inputs
()};
return
{
std
::
make_shared
<
ngraph
::
op
::
Add
>
(
ng_inputs
.
at
(
0
),
ng_inputs
.
at
(
1
))};
}
}
// namespace op
}
// namespace onnx_import
}
// namespace ngrahp
src/ngraph/frontend/onnx_import/ops_bridge.cpp
View file @
15d743f1
...
...
@@ -17,6 +17,7 @@
#include <algorithm>
#include <functional>
#include "ngraph/frontend/onnx_import/op/add.hpp"
#include "ops_bridge.hpp"
namespace
ngraph
...
...
@@ -37,6 +38,7 @@ namespace ngraph
}
// namespace error
NodeVector
add
(
const
Node
&
node
)
{
return
op
::
add
(
node
);
}
class
ops_bridge
{
public
:
...
...
@@ -59,7 +61,7 @@ namespace ngraph
return
instance
;
}
ops_bridge
()
{}
ops_bridge
()
{
m_map
.
emplace
(
"Add"
,
std
::
bind
(
add
,
std
::
placeholders
::
_1
));
}
NodeVector
operator
()(
const
Node
&
node
)
const
{
try
...
...
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