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
68698d51
Commit
68698d51
authored
Feb 18, 2020
by
mbencer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code review remarks introduced
parent
768a8e13
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
split.cpp
src/ngraph/builder/split.cpp
+7
-7
split.hpp
src/ngraph/builder/split.hpp
+4
-4
No files found.
src/ngraph/builder/split.cpp
View file @
68698d51
...
...
@@ -101,22 +101,22 @@ NodeVector builder::split(const Output<Node>& value, size_t split_parts, int axi
}
NodeVector
builder
::
opset1
::
split
(
const
Output
<
Node
>&
value
,
const
std
::
vector
<
size_t
>&
length_part
s
,
const
std
::
vector
<
size_t
>&
split_length
s
,
int64_t
axis
)
{
const
auto
axis_node
=
op
::
Constant
::
create
(
element
::
u64
,
Shape
{},
{
axis
});
const
auto
length_part
s_node
=
op
::
Constant
::
create
(
element
::
u64
,
Shape
{
length_parts
.
size
()},
length_part
s
);
const
auto
split_length
s_node
=
ngraph
::
opset1
::
Constant
::
create
(
element
::
u64
,
Shape
{
split_lengths
.
size
()},
split_length
s
);
const
auto
variadic_split
=
std
::
make_shared
<
ngraph
::
opset1
::
VariadicSplit
>
(
value
,
axis_node
,
length_part
s_node
);
std
::
make_shared
<
ngraph
::
opset1
::
VariadicSplit
>
(
value
,
axis_node
,
split_length
s_node
);
return
get_outputs
(
variadic_split
);
}
NodeVector
builder
::
opset1
::
split
(
const
Output
<
Node
>&
value
,
size_t
split_par
ts
,
int64_t
axis
)
NodeVector
builder
::
opset1
::
split
(
const
Output
<
Node
>&
value
,
size_t
num_spli
ts
,
int64_t
axis
)
{
const
auto
axis_node
=
op
::
Constant
::
create
(
element
::
u64
,
Shape
{},
{
axis
});
const
auto
split
=
std
::
make_shared
<
ngraph
::
opset1
::
Split
>
(
value
,
axis_node
,
split_par
ts
);
const
auto
axis_node
=
ngraph
::
opset1
::
Constant
::
create
(
element
::
u64
,
Shape
{},
{
axis
});
const
auto
split
=
std
::
make_shared
<
ngraph
::
opset1
::
Split
>
(
value
,
axis_node
,
num_spli
ts
);
return
get_outputs
(
split
);
}
src/ngraph/builder/split.hpp
View file @
68698d51
...
...
@@ -56,7 +56,7 @@ namespace ngraph
/// \brief Split value on specified axis into multiple parts.
///
/// \param[in] value The value to be split.
/// \param[in]
length_part
s The vector defining the lengths of each split part.
/// \param[in]
split_length
s The vector defining the lengths of each split part.
/// \param[in] axis The axis we split input node on. Default value is zero
/// axis.
/// \note This implementation supports negative `axis` values (similar to NumPy
...
...
@@ -67,13 +67,13 @@ namespace ngraph
/// The vector is output of Split:v1 op
///
NodeVector
split
(
const
Output
<
Node
>&
value
,
const
std
::
vector
<
size_t
>&
length_part
s
,
const
std
::
vector
<
size_t
>&
split_length
s
,
int64_t
axis
=
0
);
/// \brief Split node on specified axis into multiple parts.
///
/// \param[in] value The value to split.
/// \param[in]
split_parts
The number of parts we want to split output at given
/// \param[in]
num_splits
The number of parts we want to split output at given
/// axis. The length of the axis to split must be divisible by
/// this value.
/// \param[in] axis The axis we split input node on. Default value is zero
...
...
@@ -86,7 +86,7 @@ namespace ngraph
/// \return The vector containing multiple nodes we split input node into.
/// The vector is output of VariadicSplit:v1 op
///
NodeVector
split
(
const
Output
<
Node
>&
value
,
size_t
split_par
ts
,
int64_t
axis
=
0
);
NodeVector
split
(
const
Output
<
Node
>&
value
,
size_t
num_spli
ts
,
int64_t
axis
=
0
);
}
}
// namespace builder
}
// namespace ngraph
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