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
b8266cab
Commit
b8266cab
authored
Oct 02, 2019
by
Tomasz Socha
Committed by
Scott Cyphers
Oct 02, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hotfix for negative axes in unsqueeze op (#3705)
* Hotfix for negative axes in unsqueeze op * Review fix I
parent
519963e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
unsqueeze.cpp
src/ngraph/frontend/onnx_import/op/unsqueeze.cpp
+5
-1
No files found.
src/ngraph/frontend/onnx_import/op/unsqueeze.cpp
View file @
b8266cab
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
#include "ngraph/op/fused/unsqueeze.hpp"
#include "ngraph/op/fused/unsqueeze.hpp"
#include "ngraph/op/constant.hpp"
#include "ngraph/op/constant.hpp"
#include "squeeze.hpp"
#include "squeeze.hpp"
#include "utils/common.hpp"
namespace
ngraph
namespace
ngraph
{
{
...
@@ -30,8 +31,11 @@ namespace ngraph
...
@@ -30,8 +31,11 @@ namespace ngraph
{
{
auto
data
=
node
.
get_ng_inputs
().
at
(
0
);
auto
data
=
node
.
get_ng_inputs
().
at
(
0
);
auto
axes
=
node
.
get_attribute_value
<
std
::
vector
<
std
::
int64_t
>>
(
"axes"
,
{});
auto
axes
=
node
.
get_attribute_value
<
std
::
vector
<
std
::
int64_t
>>
(
"axes"
,
{});
const
auto
expanded_rank
=
data
->
get_shape
().
size
()
+
axes
.
size
();
std
::
vector
<
std
::
size_t
>
valid_axes
=
common
::
validate_axes
(
node
,
axes
,
expanded_rank
);
auto
axes_node
=
std
::
make_shared
<
ngraph
::
op
::
Constant
>
(
auto
axes_node
=
std
::
make_shared
<
ngraph
::
op
::
Constant
>
(
element
::
i64
,
Shape
{
axes
.
size
()},
axes
);
element
::
i64
,
Shape
{
valid_axes
.
size
()},
valid_
axes
);
return
{
std
::
make_shared
<
ngraph
::
op
::
Unsqueeze
>
(
data
,
axes_node
)};
return
{
std
::
make_shared
<
ngraph
::
op
::
Unsqueeze
>
(
data
,
axes_node
)};
}
}
...
...
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