ARM Compute Library
17.04
|
Basic function to compute a Fully Connected layer on OpenCL. More...
#include <CLFullyConnectedLayer.h>
Public Member Functions | |
CLFullyConnectedLayer () | |
Constructor. More... | |
void | configure (const ICLTensor *input, const ICLTensor *weights, const ICLTensor *biases, ICLTensor *output, bool transpose_weights=true) |
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... | |
Basic function to compute a Fully Connected layer on OpenCL.
This function calls the following OpenCL kernels:
transpose_weights
is set to true) (called once)biases
is not equal to nullptr)Definition at line 50 of file CLFullyConnectedLayer.h.
Constructor.
void configure | ( | const ICLTensor * | input, |
const ICLTensor * | weights, | ||
const ICLTensor * | biases, | ||
ICLTensor * | output, | ||
bool | transpose_weights = true |
||
) |
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. Data type supported: Same as input |
[in] | biases | Bias tensor. It can be nullptr. Data type supported:Same as input . |
[out] | output | Destination tensor. Data type supported: Same as input . |
[in] | transpose_weights | (Optional) Transpose weights if true. Defaults to true. |
|
overridevirtual |
Run the kernels contained in the function.
For NEON kernels:
For OpenCL kernels:
Implements IFunction.