ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert::backend::train::ITrainableTensor Class Referenceabstract

A tensor class that can be trained. More...

#include <ITrainableTensor.h>

Collaboration diagram for onert::backend::train::ITrainableTensor:

Public Member Functions

virtual ~ITrainableTensor ()=default
 
virtual std::vector< ITensor * > optVars ()=0
 Get optimizer variables of this trainable tensor.
 
 IPortableTensor (const ir::OperandInfo &info)
 
- Public Member Functions inherited from onert::backend::IPortableTensor
 IPortableTensor (const ir::OperandInfo &info)
 
virtual ~IPortableTensor ()
 
const ir::OperandInfoget_info () const
 
const ir::Sparsitysparsity () const
 
size_t total_size () const override final
 
size_t calcOffset (const ir::Coordinates &coords) const override final
 
ir::DataType data_type () const override final
 
float data_scale () const override final
 
int32_t data_zero_point () const override final
 
const std::vector< float > & data_scales () const override final
 
const std::vector< int32_t > & data_zero_points () const override
 
bool is_constant () const override final
 Return true if the tensor is constant.
 
bool is_dynamic () const override final
 Return true if the tensor needs dynamic allocation, meaning that during compile-time the outpus shape cannot be known and the output shape is calculated during kernel execution-time.
 
ir::Shape getShape () const override final
 Get ir::Shape of tensor.
 
bool has_padding () const final
 
void access (const std::function< void(ITensor &tensor)> &fn) final
 
- Public Member Functions inherited from onert::backend::ITensor
virtual ~ITensor ()
 
virtual uint8_t * buffer () const =0
 
virtual bool applyShape (const ir::Shape &)
 Set the shape to shape and possibly re-allocate the buffer.
 
virtual void set_dynamic ()
 set this tensor dynamic
 
virtual void deallocBuffer ()
 Dealloc the buffer (only for dynamic tensors)
 
virtual void setShape (const ir::Shape &)
 Set the shape of tenser to new_shape.
 
virtual bool is_subtensor () const
 
virtual bool needMemoryMap () const
 
virtual void enqueueWriteBuffer (const void *, bool)
 
virtual void enqueueReadBuffer (void *, bool)
 

Additional Inherited Members

- Protected Attributes inherited from onert::backend::IPortableTensor
ir::OperandInfo _info
 

Detailed Description

A tensor class that can be trained.

Definition at line 35 of file ITrainableTensor.h.

Constructor & Destructor Documentation

◆ ~ITrainableTensor()

virtual onert::backend::train::ITrainableTensor::~ITrainableTensor ( )
virtualdefault

Member Function Documentation

◆ IPortableTensor()

onert::backend::IPortableTensor::IPortableTensor ( const ir::OperandInfo info)
inline

Definition at line 41 of file IPortableTensor.h.

41: _info(info) {}
volatile const char info[]

◆ optVars()

virtual std::vector< ITensor * > onert::backend::train::ITrainableTensor::optVars ( )
pure virtual

Get optimizer variables of this trainable tensor.

Returns
Optimizer variables

Implemented in onert::backend::basic::train::TrainableTensor.


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