24.02.1
|
Basic function to unpack a rank-R tensor into rank-(R-1) tensors. More...
#include <CLUnstack.h>
Public Member Functions | |
CLUnstack () | |
Default constructor. More... | |
void | configure (const ICLTensor *input, const std::vector< ICLTensor * > &output_vector, int axis) |
Set the input, output and unstacking axis. More... | |
void | configure (const CLCompileContext &compile_context, const ICLTensor *input, const std::vector< ICLTensor * > &output_vector, int axis) |
Set the input, output and unstacking axis. More... | |
void | run () override |
Run the kernels contained in the function. More... | |
Public Member Functions inherited from IFunction | |
virtual | ~IFunction ()=default |
Destructor. More... | |
virtual void | prepare () |
Prepare the function for executing. More... | |
Static Public Member Functions | |
static Status | validate (const ITensorInfo *input, const std::vector< ITensorInfo * > &output_vector, int axis) |
Static function to check if given info will lead to a valid configuration of CLUnstack. More... | |
Basic function to unpack a rank-R tensor into rank-(R-1) tensors.
This function calls the following functions:
Definition at line 43 of file CLUnstack.h.
CLUnstack | ( | ) |
Default constructor.
Definition at line 60 of file CLUnstack.cpp.
void configure | ( | const CLCompileContext & | compile_context, |
const ICLTensor * | input, | ||
const std::vector< ICLTensor * > & | output_vector, | ||
int | axis | ||
) |
Set the input, output and unstacking axis.
[in] | compile_context | The compile context to be used. |
[in] | input | A tensor to be unstacked. Data type supported: All. |
[in,out] | output_vector | A vector of tensors. Data types supported: same as input . Note: The number of elements of the vector will be used as the number of slices to be taken from the axis. |
[in] | axis | The axis to unstack along. Valid values are [-R,R) where R is the input's rank. Negative values wrap around. |
Definition at line 70 of file CLUnstack.cpp.
References ARM_COMPUTE_ERROR_ON_NULLPTR, ARM_COMPUTE_ERROR_THROW_ON, ARM_COMPUTE_LOG_PARAMS, arm_compute::test::validation::input, Dimensions< T >::set(), arm_compute::test::validation::reference::slice(), tf_frozen_model_extractor::t, and CLUnstack::validate().
void configure | ( | const ICLTensor * | input, |
const std::vector< ICLTensor * > & | output_vector, | ||
int | axis | ||
) |
Set the input, output and unstacking axis.
Valid data layouts:
Valid data type configurations:
src | dst |
---|---|
All | All |
[in] | input | A tensor to be unstacked. Data type supported: All. |
[in,out] | output_vector | A vector of tensors. Data types supported: same as input . Note: The number of elements of the vector will be used as the number of slices to be taken from the axis. |
[in] | axis | The axis to unstack along. Valid values are [-R,R) where R is the input's rank. Negative values wrap around. |
Definition at line 65 of file CLUnstack.cpp.
References CLKernelLibrary::get(), and arm_compute::test::validation::input.
|
overridevirtual |
Run the kernels contained in the function.
For CPU kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 126 of file CLUnstack.cpp.
|
static |
Static function to check if given info will lead to a valid configuration of CLUnstack.
[in] | input | Input tensor info. Data type supported: All. |
[in] | output_vector | Vector of output tensors' info. Data types supported: same as input . |
[in] | axis | The axis to unstack along. Valid values are [-R,R) where R is the input's rank. Negative values wrap around. |
Definition at line 104 of file CLUnstack.cpp.
References ARM_COMPUTE_RETURN_ERROR_ON, ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR, ARM_COMPUTE_RETURN_ON_ERROR, arm_compute::test::validation::input, Dimensions< T >::set(), and CLStridedSlice::validate().
Referenced by CLUnstack::configure().