21.02
|
Basic function to spatial divide a tensor. More...
#include <NESpaceToBatchLayer.h>
Public Member Functions | |
NESpaceToBatchLayer () | |
Default constructor. More... | |
NESpaceToBatchLayer (const NESpaceToBatchLayer &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NESpaceToBatchLayer & | operator= (const NESpaceToBatchLayer &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NESpaceToBatchLayer (NESpaceToBatchLayer &&)=default | |
Allow instances of this class to be moved. More... | |
NESpaceToBatchLayer & | operator= (NESpaceToBatchLayer &&)=default |
Allow instances of this class to be moved. More... | |
~NESpaceToBatchLayer () | |
Default destructor. More... | |
void | configure (const ITensor *input, const ITensor *block_shape, const ITensor *paddings, ITensor *output) |
Set the input and output tensors. More... | |
void | configure (const ITensor *input, const int block_shape_x, const int block_shape_y, const Size2D &padding_left, const Size2D &padding_right, ITensor *output) |
Set the input and output tensors. 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 ITensorInfo *block_shape, const ITensorInfo *paddings, const ITensorInfo *output) |
Static function to check if given info will lead to a valid configuration of NESpaceToBatchLayer. More... | |
static Status | validate (const ITensorInfo *input, const int block_shape_x, const int block_shape_y, const Size2D &padding_left, const Size2D &padding_right, const ITensorInfo *output) |
Static function to check if given info will lead to a valid configuration of NESpaceToBatchLayer (Static block shape and paddings) More... | |
Basic function to spatial divide a tensor.
This function calls the following Neon kernels/functions:
Definition at line 44 of file NESpaceToBatchLayer.h.
Default constructor.
Definition at line 39 of file NESpaceToBatchLayer.cpp.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Allow instances of this class to be moved.
|
default |
Default destructor.
void configure | ( | const ITensor * | input, |
const ITensor * | block_shape, | ||
const ITensor * | paddings, | ||
ITensor * | output | ||
) |
Set the input and output tensors.
[in] | input | Tensor input. Supported tensor rank: 4. Data types supported: All. |
[in] | block_shape | 1-D tensor with shape [M]. Supported M: 2. Data types supported: S32 |
[in] | paddings | 2-D tensor with shape [2, M] (First dimension is the fastest-changing dimension). Supported M: 2. Data types supported: S32 |
[out] | output | Tensor output. Data types supported: same as input |
Definition at line 44 of file NESpaceToBatchLayer.cpp.
References ARM_COMPUTE_ERROR_ON_NULLPTR, ITensorInfo::data_type(), ITensor::info(), ITensorInfo::quantization_info(), ITensorInfo::tensor_shape(), and TensorShape::total_size().
void configure | ( | const ITensor * | input, |
const int | block_shape_x, | ||
const int | block_shape_y, | ||
const Size2D & | padding_left, | ||
const Size2D & | padding_right, | ||
ITensor * | output | ||
) |
Set the input and output tensors.
(Static block shape and paddings)
[in] | input | Tensor input. Supported tensor rank: 4. Data types supported: All. |
[in] | block_shape_x | Block shape x value. |
[in] | block_shape_y | Block shape y value. |
[in] | padding_left | The padding at the beginning of every dimension of the output tensor. |
[in] | padding_right | The padding at the end of every dimension of the output tensor. |
[out] | output | Tensor output. Data types supported: same as input |
Definition at line 58 of file NESpaceToBatchLayer.cpp.
References ARM_COMPUTE_ERROR_ON_NULLPTR, ITensorInfo::data_type(), ITensor::info(), ITensorInfo::quantization_info(), ITensorInfo::tensor_shape(), and TensorShape::total_size().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Allow instances of this class to be moved.
|
overridevirtual |
Run the kernels contained in the function.
For Neon kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 87 of file NESpaceToBatchLayer.cpp.
References Window::DimY, Scheduler::get(), and IScheduler::schedule().
|
static |
Static function to check if given info will lead to a valid configuration of NESpaceToBatchLayer.
[in] | input | Tensor input info. Supported tensor rank: 4. Data types supported: All. |
[in] | block_shape | 1-D tensor with shape [M]. Supported M: 2. Data types supported: S32 |
[in] | paddings | 2-D tensor with shape [2, M] (First dimension is the fastest-changing dimension). Supported M: 2. Data types supported: S32 |
[in] | output | Tensor output info. Data types supported: same as input |
Definition at line 72 of file NESpaceToBatchLayer.cpp.
References ARM_COMPUTE_RETURN_ON_ERROR, and NESpaceToBatchLayerKernel::validate().
|
static |
Static function to check if given info will lead to a valid configuration of NESpaceToBatchLayer (Static block shape and paddings)
[in] | input | Tensor input info. Supported tensor rank: 4. Data types supported: All. |
[in] | block_shape_x | Block shape x value. |
[in] | block_shape_y | Block shape y value. |
[in] | padding_left | The padding at the beginning of every dimension of the output tensor. |
[in] | padding_right | The padding at the end of every dimension of the output tensor. |
[in] | output | Tensor output info. Data types supported: same as input |
Definition at line 79 of file NESpaceToBatchLayer.cpp.
References ARM_COMPUTE_RETURN_ON_ERROR, and NESpaceToBatchLayerKernel::validate().