Compute Library
 21.02
CLConvertFullyConnectedWeights Class Reference

Basic function to run CLConvertFullyConnectedWeightsKernel. More...

#include <CLConvertFullyConnectedWeights.h>

Collaboration diagram for CLConvertFullyConnectedWeights:
[legend]

Public Member Functions

void configure (const ICLTensor *input, ICLTensor *output, const TensorShape &original_input_shape, DataLayout data_layout)
 Initialize the function. More...
 
void configure (const CLCompileContext &compile_context, const ICLTensor *input, ICLTensor *output, const TensorShape &original_input_shape, DataLayout data_layout)
 Initialize the function. More...
 
- Public Member Functions inherited from ICLSimpleFunction
 ICLSimpleFunction (CLRuntimeContext *ctx=nullptr)
 Constructor. More...
 
 ICLSimpleFunction (const ICLSimpleFunction &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 ICLSimpleFunction (ICLSimpleFunction &&)=default
 Default move constructor. More...
 
ICLSimpleFunctionoperator= (const ICLSimpleFunction &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
ICLSimpleFunctionoperator= (ICLSimpleFunction &&)=default
 Default move assignment operator. More...
 
 ~ICLSimpleFunction ()
 Default destructor. More...
 
void run () override final
 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, const TensorShape &original_input_shape, DataLayout data_layout)
 Static function to check if given info will lead to a valid configuration of CLConvertFullyConnectedWeights. More...
 

Detailed Description

Basic function to run CLConvertFullyConnectedWeightsKernel.

Definition at line 40 of file CLConvertFullyConnectedWeights.h.

Member Function Documentation

◆ configure() [1/2]

void configure ( const ICLTensor input,
ICLTensor output,
const TensorShape original_input_shape,
DataLayout  data_layout 
)

Initialize the function.

Parameters
[in]inputSource weights tensor to convert. Must be 2 dimensional. Data types supported: All.
[out]outputThe converted weights tensor. Shape and Data Type: Same as input.
[in]original_input_shapeShape of the original input tensor (the one entering fully connected layer).
[in]data_layoutThe data layout the weights have been trained in.
Returns
A status

Definition at line 30 of file CLConvertFullyConnectedWeights.cpp.

References CLKernelLibrary::get().

Referenced by CLConvertFullyConnectedWeightsManaged::configure(), and CLFullyConnectedLayer::configure().

32 {
33  configure(CLKernelLibrary::get().get_compile_context(), input, output, original_input_shape, data_layout);
34 }
const DataLayout data_layout
Definition: Im2Col.cpp:151
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
void configure(const ICLTensor *input, ICLTensor *output, const TensorShape &original_input_shape, DataLayout data_layout)
Initialize the function.

◆ configure() [2/2]

void configure ( const CLCompileContext compile_context,
const ICLTensor input,
ICLTensor output,
const TensorShape original_input_shape,
DataLayout  data_layout 
)

Initialize the function.

Parameters
[in]compile_contextThe compile context to be used.
[in]inputSource weights tensor to convert. Must be 2 dimensional. Data types supported: All.
[out]outputThe converted weights tensor. Shape and Data Type: Same as input.
[in]original_input_shapeShape of the original input tensor (the one entering fully connected layer).
[in]data_layoutThe data layout the weights have been trained in.
Returns
A status

Definition at line 36 of file CLConvertFullyConnectedWeights.cpp.

38 {
39  auto k = std::make_unique<CLConvertFullyConnectedWeightsKernel>();
40  k->configure(compile_context, input, output, original_input_shape, data_layout);
41  _kernel = std::move(k);
42 }
const DataLayout data_layout
Definition: Im2Col.cpp:151

◆ validate()

Status validate ( const ITensorInfo input,
const ITensorInfo output,
const TensorShape original_input_shape,
DataLayout  data_layout 
)
static

Static function to check if given info will lead to a valid configuration of CLConvertFullyConnectedWeights.

Parameters
[in]inputSource weights tensor info to convert. Must be 2 dimensional. Data types supported: All.
[in]outputThe converted weights tensor info. Shape and Data Type: Same as input.
[in]original_input_shapeShape of the original input tensor (the one entering fully connected layer).
[in]data_layoutThe data layout the weights have been trained in.

Definition at line 44 of file CLConvertFullyConnectedWeights.cpp.

References CLConvertFullyConnectedWeightsKernel::validate().

Referenced by arm_compute::test::validation::DATA_TEST_CASE(), and CLFullyConnectedLayer::validate().

46 {
47  return CLConvertFullyConnectedWeightsKernel::validate(input, output, original_input_shape, data_layout);
48 }
const DataLayout data_layout
Definition: Im2Col.cpp:151
static Status validate(const ITensorInfo *input, const ITensorInfo *output, const TensorShape &original_input_shape, DataLayout data_layout)
Static function to check if given info will lead to a valid configuration of CLConvertFullyConnectedW...

The documentation for this class was generated from the following files: