1 //*****************************************************************************
2 // Copyright 2017-2020 Intel Corporation
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //*****************************************************************************
20 #include "ngraph/node.hpp"
26 /// \brief Split value on specified axis into multiple parts.
28 /// \param value The value to be split.
29 /// \param length_parts The vector defining the lengths of each split part.
30 /// \param axis The axis we split input node on. Default value is zero axis.
32 /// \return The vector containing multiple nodes we split input node into.
34 NGRAPH_DEPRECATED("This builder was deprecated.")
35 OutputVector split(const Output<Node>& value,
36 const std::vector<size_t>& length_parts,
39 /// \brief Split node on specified axis into multiple parts.
41 /// \param value The value to split.
42 /// \param split_parts The number of parts we want to split output at given
43 /// axis. The length of the axis to split must be divisible by
45 /// \param axis The axis we split input node on. Default value is zero axis.
47 /// \note This implementation supports negative `axis` values (similar to NumPy
48 /// indexing). This means that the axis to split on will be counted from
49 /// the back of the tensor (negative values are subtracted from its rank).
51 /// \return The vector containing multiple outputs we split input node into.
53 NGRAPH_DEPRECATED("This builder was deprecated.")
55 OutputVector split(const Output<Node>& value, size_t split_parts, int axis = 0);
59 /// \brief Split value on specified axis into multiple parts.
61 /// \param value The value to be split.
62 /// \param split_lengths The vector defining the lengths of each split part.
63 /// \param axis The axis we split input node on. Default value is zero
65 /// \note This implementation supports negative `axis` values (similar to NumPy
66 /// indexing). This means that the axis to split on will be counted from
67 /// the back of the tensor (negative values are subtracted from its rank).
69 /// \return The vector containing multiple outputs we split input node into.
70 /// The vector is output of Split:v1 op
73 OutputVector split(const Output<Node>& value,
74 const std::vector<size_t>& split_lengths,
77 /// \brief Split value on specified axis into multiple parts.
79 /// \param value The value to split.
80 /// \param num_splits The number of parts we want to split output at given
81 /// axis. The length of the axis to split must be divisible by
83 /// \param axis The axis we split input node on. Default value is zero
86 /// \note This implementation supports negative `axis` values (similar to NumPy
87 /// indexing). This means that the axis to split on will be counted from
88 /// the back of the tensor (negative values are subtracted from its rank).
90 /// \return The vector containing multiple nodes we split input node into.
91 /// The vector is output of VariadicSplit:v1 op
94 OutputVector split(const Output<Node>& value, size_t num_splits, int64_t axis = 0);
96 } // namespace builder