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
7e78232a
Commit
7e78232a
authored
Oct 31, 2019
by
Ewa Tusień
Committed by
Michał Karzyński
Oct 31, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ONNX] Add support for optional C input in Gemm op (#3821)
parent
b9d7b7d2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
gemm.cpp
src/ngraph/frontend/onnx_import/op/gemm.cpp
+14
-3
No files found.
src/ngraph/frontend/onnx_import/op/gemm.cpp
View file @
7e78232a
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
#include <memory>
#include <memory>
#include "gemm.hpp"
#include "gemm.hpp"
#include "ngraph/op/constant.hpp"
#include "ngraph/op/fused/gemm.hpp"
#include "ngraph/op/fused/gemm.hpp"
namespace
ngraph
namespace
ngraph
...
@@ -30,9 +31,19 @@ namespace ngraph
...
@@ -30,9 +31,19 @@ namespace ngraph
NodeVector
gemm
(
const
Node
&
node
)
NodeVector
gemm
(
const
Node
&
node
)
{
{
NodeVector
inputs
{
node
.
get_ng_inputs
()};
NodeVector
inputs
{
node
.
get_ng_inputs
()};
auto
input_a
=
inputs
.
at
(
0
);
std
::
shared_ptr
<
ngraph
::
Node
>
input_a
=
inputs
.
at
(
0
);
auto
input_b
=
inputs
.
at
(
1
);
std
::
shared_ptr
<
ngraph
::
Node
>
input_b
=
inputs
.
at
(
1
);
auto
input_c
=
inputs
.
at
(
2
);
std
::
shared_ptr
<
ngraph
::
Node
>
input_c
;
if
(
inputs
.
size
()
==
3
)
{
input_c
=
inputs
.
at
(
2
);
}
else
{
input_c
=
ngraph
::
op
::
Constant
::
create
(
input_b
->
get_element_type
(),
ngraph
::
Shape
{},
{
0
});
}
double
alpha
=
node
.
get_attribute_value
<
double
>
(
"alpha"
,
1
);
double
alpha
=
node
.
get_attribute_value
<
double
>
(
"alpha"
,
1
);
double
beta
=
node
.
get_attribute_value
<
double
>
(
"beta"
,
1
);
double
beta
=
node
.
get_attribute_value
<
double
>
(
"beta"
,
1
);
...
...
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