ONE - On-device Neural Engine
|
#include <CLFullyConnectedHybridLayer.h>
Public Member Functions | |
CLFullyConnectedHybridLayer (std::shared_ptr< IMemoryManager > memory_manager=nullptr) | |
CLFullyConnectedHybridLayer (const CLFullyConnectedHybridLayer &)=delete | |
CLFullyConnectedHybridLayer (CLFullyConnectedHybridLayer &&)=default | |
CLFullyConnectedHybridLayer & | operator= (const CLFullyConnectedHybridLayer &)=delete |
CLFullyConnectedHybridLayer & | operator= (CLFullyConnectedHybridLayer &&)=default |
void | configure (const ICLTensor *input, const ICLTensor *weights, const ICLTensor *biases, ICLTensor *output, FullyConnectedLayerInfo fc_info=FullyConnectedLayerInfo()) |
void | run () override |
void | prepare () override |
Static Public Member Functions | |
static Status | validate (const ITensorInfo *input, const ITensorInfo *weights, const ITensorInfo *biases, const ITensorInfo *output, FullyConnectedLayerInfo fc_info=FullyConnectedLayerInfo()) |
Basic function to compute a Fully Connected layer on OpenCL. This function calls the following OpenCL kernels:
are_weights_reshaped
is set to false and transpose_weights is set to true ) (called once)biases
is not equal to nullptr)Definition at line 69 of file CLFullyConnectedHybridLayer.h.
CLFullyConnectedHybridLayer::CLFullyConnectedHybridLayer | ( | std::shared_ptr< IMemoryManager > | memory_manager = nullptr | ) |
Constructor
Definition at line 68 of file CLFullyConnectedHybridLayer.cpp.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Default move constructor
void CLFullyConnectedHybridLayer::configure | ( | const ICLTensor * | input, |
const ICLTensor * | weights, | ||
const ICLTensor * | biases, | ||
ICLTensor * | output, | ||
FullyConnectedLayerInfo | fc_info = FullyConnectedLayerInfo() |
||
) |
Set the input and output tensors.
[in] | input | Source tensor. Data type supported: F16/F32. |
[in] | weights | Weights tensor. The weights must be 2 dimensional. If this function is called after a Convolution Layer, the (transposed) weights will have as many rows as the product of the first 3 input's dimensions. If it is called after another FullyConnected Layer, the (transposed) weights will have as many rows as the input's first dimension. Data type supported: S8. |
[in] | biases | Bias tensor. Can be nullptr. Data type supported:Same as input . |
[out] | output | Destination tensor. Its shape should be equal to the output of a matrix multiplication between:
|
[in] | fc_info | (Optional) Fully connected layer additional info |
Definition at line 88 of file CLFullyConnectedHybridLayer.cpp.
References arm_compute::CLQuantizationSymmetricKernel::configure(), arm_compute::CLMultiplyScaleFactorKernel::configure(), arm_compute::CLScaleFactorSymm8Kernel::configure(), arm_compute::CLGEMMMatrixAccumulateBiasesKernel::configure(), and validate().
|
default |
Default move assignment operator
References validate().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
override |
Definition at line 290 of file CLFullyConnectedHybridLayer.cpp.
Referenced by run().
|
override |
Definition at line 265 of file CLFullyConnectedHybridLayer.cpp.
References prepare().
Referenced by package.infer.session::inference().
|
static |
Static function to check if given info will lead to a valid configuration of CLFullyConnectedHybridLayer
[in] | input | Source tensor info. Data type supported: F16/F32. |
[in] | weights | Weights tensor info. The weights must be 2 dimensional. If this function is called after a Convolution Layer, the (transposed) weights will have as many rows as the product of the first 3 input's dimensions. If it is called after another FullyConnected Layer, the (transposed) weights will have as many rows as the input's first dimension. Data type supported: S8. |
[in] | biases | Bias tensor info. Can be nullptr. Data type supported:Same as input . |
[out] | output | Destination tensor info. Its shape should be equal to the output of a matrix multiplication between:
|
[in] | fc_info | (Optional) Fully connected layer additional info |
Definition at line 183 of file CLFullyConnectedHybridLayer.cpp.
References arm_compute::CLGEMMMatrixAccumulateBiasesKernel::validate(), arm_compute::CLScaleFactorSymm8Kernel::validate(), arm_compute::CLMultiplyScaleFactorKernel::validate(), and arm_compute::CLQuantizationSymmetricKernel::validate().
Referenced by configure(), and operator=().