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
1974a90d
Unverified
Commit
1974a90d
authored
Jan 31, 2020
by
Evgenya Stepyreva
Committed by
GitHub
Jan 31, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Setting outputs for dynamic v1::Split (#4256)
Co-authored-by:
Scott Cyphers
<
diyessi@users.noreply.github.com
>
parent
e37b386e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
18 deletions
+15
-18
split.cpp
src/ngraph/op/fused/split.cpp
+15
-18
No files found.
src/ngraph/op/fused/split.cpp
View file @
1974a90d
...
...
@@ -135,32 +135,29 @@ void op::v1::Split::validate_and_infer_types()
NODE_VALIDATION_CHECK
(
this
,
axis_et
.
is_integral
(),
"The 'axis' input only accepts integral types"
);
if
(
input_value
(
1
).
get_node_shared_ptr
()
->
is_constant
())
if
(
input_value
(
1
).
get_node_shared_ptr
()
->
is_constant
()
&&
data_ps
.
is_static
()
)
{
const
auto
axis_input
=
as_type_ptr
<
op
::
Constant
>
(
input_value
(
1
).
get_node_shared_ptr
());
auto
axis
=
axis_input
->
cast_vector
<
int64_t
>
()[
0
];
if
(
data_ps
.
is_static
())
{
const
auto
data_shape
=
data_ps
.
to_shape
();
axis
=
ngraph
::
normalize_axis
(
this
,
axis
,
data_shape
.
size
());
const
auto
data_shape
=
data_ps
.
to_shape
();
axis
=
ngraph
::
normalize_axis
(
this
,
axis
,
data_shape
.
size
());
const
auto
dimension_at_axis
=
data_shape
.
at
(
axis
);
const
auto
dimension_at_axis
=
data_shape
.
at
(
axis
);
NODE_VALIDATION_CHECK
(
this
,
dimension_at_axis
%
m_num_splits
==
0
,
"The input tensor's dimension pointed by the 'axis' parameter: "
,
dimension_at_axis
,
" has to be a multiple of the 'num_splits' attribute value: "
,
m_num_splits
);
NODE_VALIDATION_CHECK
(
this
,
dimension_at_axis
%
m_num_splits
==
0
,
"The input tensor's dimension pointed by the 'axis' parameter: "
,
dimension_at_axis
,
" has to be a multiple of the 'num_splits' attribute value: "
,
m_num_splits
);
Shape
each_output_shape
{
data_shape
};
each_output_shape
.
at
(
axis
)
=
dimension_at_axis
/
m_num_splits
;
Shape
each_output_shape
{
data_shape
};
each_output_shape
.
at
(
axis
)
=
dimension_at_axis
/
m_num_splits
;
for
(
size_t
i
=
0
;
i
<
m_num_splits
;
++
i
)
{
set_output_type
(
i
,
input
(
0
).
get_element_type
(),
each_output_shape
);
}
for
(
size_t
i
=
0
;
i
<
m_num_splits
;
++
i
)
{
set_output_type
(
i
,
input
(
0
).
get_element_type
(),
each_output_shape
);
}
}
else
...
...
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