21.02
|
Basic function to execute flatten. More...
#include <CLFlattenLayer.h>
Public Member Functions | |
void | configure (const ICLTensor *input, ICLTensor *output) |
Initialise the kernel's input and output. More... | |
void | configure (const CLCompileContext &compile_context, const ICLTensor *input, ICLTensor *output) |
Initialise the kernel's input and output. 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 *output) |
Static function to check if given info will lead to a valid configuration of CLFlattenLayer. More... | |
Basic function to execute flatten.
This function calls the following OpenCL kernel:
Definition at line 42 of file CLFlattenLayer.h.
Initialise the kernel's input and output.
[in] | input | First input tensor to flatten with at least 3 dimensions. The dimensions above the third will be interpreted as batches. Data types supported: All. |
[out] | output | Output tensor with shape [w*h*d, input_batches] where: w = width input tensor, h = height input tensor and d = depth input tensor. Data type supported: same as input |
Definition at line 36 of file CLFlattenLayer.cpp.
References CLKernelLibrary::get().
void configure | ( | const CLCompileContext & | compile_context, |
const ICLTensor * | input, | ||
ICLTensor * | output | ||
) |
Initialise the kernel's input and output.
[in] | compile_context | The compile context to be used. |
[in] | input | First input tensor to flatten with at least 3 dimensions. The dimensions above the third will be interpreted as batches. Data types supported: All. |
[out] | output | Output tensor with shape [w*h*d, input_batches] where: w = width input tensor, h = height input tensor and d = depth input tensor. Data type supported: same as input |
Definition at line 41 of file CLFlattenLayer.cpp.
References ARM_COMPUTE_ERROR_ON_NULLPTR, arm_compute::auto_init_if_empty(), ICloneable< T >::clone(), arm_compute::misc::shape_calculator::compute_flatten_shape(), CLReshapeLayer::configure(), and ITensor::info().
|
overridevirtual |
Run the kernels contained in the function.
For Neon kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 59 of file CLFlattenLayer.cpp.
References CLReshapeLayer::run().
Referenced by CLFullyConnectedLayer::run().
|
static |
Static function to check if given info will lead to a valid configuration of CLFlattenLayer.
[in] | input | First input tensor to flatten with at least 3 dimensions. The dimensions above the third will be interpreted as batches. Data types supported: All. |
[out] | output | Output tensor with shape [w*h*d, input_batches] where: w = width input tensor, h = height input tensor and d = depth input tensor. Data type supported: same as input |
Definition at line 48 of file CLFlattenLayer.cpp.
References ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_SHAPES, ICloneable< T >::clone(), arm_compute::misc::shape_calculator::compute_flatten_shape(), ITensorInfo::total_size(), and CLReshapeLayer::validate().
Referenced by CLFullyConnectedLayer::validate().