Compute Library
 19.08
NEConvertFullyConnectedWeights Class Reference

Basic function to run NEConvertFullyConnectedWeightsKernel. More...

#include <NEConvertFullyConnectedWeights.h>

Collaboration diagram for NEConvertFullyConnectedWeights:
[legend]

Public Member Functions

 NEConvertFullyConnectedWeights ()
 Default constructor. More...
 
void configure (const ITensor *input, ITensor *output, const TensorShape &original_input_shape, DataLayout data_layout)
 Initialize the function. 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, const TensorShape &original_input_shape, DataLayout data_layout)
 Static function to check if given info will lead to a valid configuration of NEConvertFullyConnectedWeights. More...
 

Detailed Description

Basic function to run NEConvertFullyConnectedWeightsKernel.

Definition at line 36 of file NEConvertFullyConnectedWeights.h.

Constructor & Destructor Documentation

◆ NEConvertFullyConnectedWeights()

Default constructor.

Definition at line 28 of file NEConvertFullyConnectedWeights.cpp.

29  : _kernel()
30 {
31 }

Member Function Documentation

◆ configure()

void configure ( const ITensor input,
ITensor 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: U8/S8/QASYMM8/U16/S16/U32/S32/F16/F32.
[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.

Definition at line 33 of file NEConvertFullyConnectedWeights.cpp.

35 {
36  _kernel.configure(input, output, original_input_shape, data_layout);
37 }
const DataLayout data_layout
Definition: Im2Col.cpp:146
void configure(const ITensor *input, ITensor *output, const TensorShape &original_input_shape, DataLayout data_layout)
Set the input and output tensor.

References NEConvertFullyConnectedWeightsKernel::configure(), and arm_compute::test::validation::data_layout.

Referenced by NEFullyConnectedLayer::configure().

◆ run()

void run ( )
overridevirtual

Run the kernels contained in the function.

For NEON kernels:

  • Multi-threading is used for the kernels which are parallelisable.
  • By default std::thread::hardware_concurrency() threads are used.
Note
CPPScheduler::set_num_threads() can be used to manually set the number of threads

For OpenCL kernels:

  • All the kernels are enqueued on the queue associated with CLScheduler.
  • The queue is then flushed.
Note
The function will not block until the kernels are executed. It is the user's responsibility to wait.
Will call prepare() on first run if hasn't been done

Implements IFunction.

Definition at line 45 of file NEConvertFullyConnectedWeights.cpp.

46 {
48 }
virtual void schedule(ICPPKernel *kernel, const Hints &hints)=0
Runs the kernel in the same thread as the caller synchronously.
static constexpr size_t DimZ
Alias for dimension 2 also known as Z dimension.
Definition: Window.h:47
static IScheduler & get()
Access the scheduler singleton.
Definition: Scheduler.cpp:96

References Window::DimZ, Scheduler::get(), and IScheduler::schedule().

Referenced by NEFullyConnectedLayer::prepare().

◆ 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 NEConvertFullyConnectedWeights.

Parameters
[in]inputSource weights tensor info to convert. Must be 2 dimensional. Data types supported: U8/S8/QASYMM8/U16/S16/U32/S32/F16/F32.
[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 39 of file NEConvertFullyConnectedWeights.cpp.

41 {
42  return NEConvertFullyConnectedWeightsKernel::validate(input, output, original_input_shape, data_layout);
43 }
const DataLayout data_layout
Definition: Im2Col.cpp:146
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 NEConvertFullyConnectedW...

References arm_compute::test::validation::data_layout, and NEConvertFullyConnectedWeightsKernel::validate().

Referenced by NEFullyConnectedLayer::validate().


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