Compute Library
 21.02
NEConvertFullyConnectedWeightsManaged Class Reference

Basic function to run NEConvertFullyConnectedWeightsKernel. More...

#include <NEConvertFullyConnectedWeights.h>

Collaboration diagram for NEConvertFullyConnectedWeightsManaged:
[legend]

Public Member Functions

void run () override
 Run the transformation function. More...
 
void release () override
 Release transformed weights memory. More...
 
ITensorget_weights () override
 Get a pointer to the transformed weights. More...
 
uint32_t uid () override
 Function that returns a unique id of the reshape function. More...
 
void configure (const ITensor *input, const TensorShape &original_input_shape, DataLayout data_layout)
 
- Public Member Functions inherited from ITransformWeights
 ITransformWeights ()=default
 Default Constructor. More...
 
virtual ~ITransformWeights ()=default
 Default Destructor. More...
 
 ITransformWeights (const ITransformWeights &)=delete
 Prevent instances of this class to be copy constructed. More...
 
ITransformWeightsoperator= (const ITransformWeights &)=delete
 Prevent instances of this class to be copied. More...
 
 ITransformWeights (ITransformWeights &&other)
 Allow instances of this class to be move constructed. More...
 
ITransformWeightsoperator= (ITransformWeights &&other)
 Allow instances of this class to be moved. More...
 
void increase_refcount ()
 Increase the object's refcount. More...
 
int32_t decrease_refcount ()
 Decrease the object's refcount and return the updated value. More...
 
bool is_reshape_run ()
 Function that returns a flag on whether the weights are reshaped or not. More...
 

Detailed Description

Basic function to run NEConvertFullyConnectedWeightsKernel.

Definition at line 84 of file NEConvertFullyConnectedWeights.h.

Member Function Documentation

◆ configure()

void configure ( const ITensor input,
const TensorShape original_input_shape,
DataLayout  data_layout 
)
inline

Definition at line 109 of file NEConvertFullyConnectedWeights.h.

Referenced by NEFullyConnectedLayer::configure().

110  {
111  _func.configure(input, &_output, original_input_shape, data_layout);
112  }
const DataLayout data_layout
Definition: Im2Col.cpp:151
void configure(const ITensor *input, ITensor *output, const TensorShape &original_input_shape, DataLayout data_layout)
Initialize the function.

◆ get_weights()

ITensor* get_weights ( )
inlineoverridevirtual

Get a pointer to the transformed weights.

Returns
The pointer to the transformed ITensor weights

Implements ITransformWeights.

Definition at line 99 of file NEConvertFullyConnectedWeights.h.

100  {
101  return &_output;
102  }

◆ release()

void release ( )
inlineoverridevirtual

Release transformed weights memory.

Implements ITransformWeights.

Definition at line 94 of file NEConvertFullyConnectedWeights.h.

95  {
96  _output.allocator()->free();
97  }
TensorAllocator * allocator()
Return a pointer to the tensor&#39;s allocator.
Definition: Tensor.cpp:48
void free() override
Free allocated CPU memory.

◆ run()

void run ( )
inlineoverridevirtual

Run the transformation function.

Implements ITransformWeights.

Definition at line 87 of file NEConvertFullyConnectedWeights.h.

88  {
89  _output.allocator()->allocate();
90  _func.run();
91  _reshape_run = true;
92  }
TensorAllocator * allocator()
Return a pointer to the tensor&#39;s allocator.
Definition: Tensor.cpp:48
void allocate() override
Allocate size specified by TensorInfo of CPU memory.
void run() override
Run the kernels contained in the function.

◆ uid()

uint32_t uid ( )
inlineoverridevirtual

Function that returns a unique id of the reshape function.

Returns
The computed unique id

Implements ITransformWeights.

Definition at line 104 of file NEConvertFullyConnectedWeights.h.

105  {
106  return _uid;
107  }

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