ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert::ir::train::TrainableOperation Class Reference

#include <TrainableOperation.h>

Collaboration diagram for onert::ir::train::TrainableOperation:

Public Member Functions

virtual ~TrainableOperation ()=default
 
void disableWeightsUpdate () final
 
void enableWeightsUpdate () final
 
virtual bool isWeightsUpdateEnabled () const final
 
void enableBackward () final
 
void disableBackward () final
 
virtual bool isRequiredForBackward () const final
 
- Public Member Functions inherited from onert::ir::train::ITrainableOperation
virtual ~ITrainableOperation ()=default
 
virtual std::unique_ptr< ITrainableOperationclone () const =0
 
virtual void accept (OperationVisitor &v) const override=0
 
virtual void accept (TrainableOperationVisitor &v) const =0
 
virtual bool hasTrainableParameter () const =0
 
- Public Member Functions inherited from onert::ir::IOperation
virtual ~IOperation ()=default
 
virtual std::string name () const
 
virtual OpCode opcode () const =0
 
virtual void replaceInputs (const OperandIndex &from, const OperandIndex &to)=0
 
virtual void replaceOutputs (const OperandIndex &from, const OperandIndex &to)=0
 
virtual const OperandIndexSequencegetInputs () const =0
 
virtual const OperandIndexSequencegetOutputs () const =0
 

Detailed Description

Definition at line 29 of file TrainableOperation.h.

Constructor & Destructor Documentation

◆ ~TrainableOperation()

virtual onert::ir::train::TrainableOperation::~TrainableOperation ( )
virtualdefault

Member Function Documentation

◆ disableBackward()

void onert::ir::train::TrainableOperation::disableBackward ( )
inlinefinalvirtual

Implements onert::ir::train::ITrainableOperation.

Definition at line 42 of file TrainableOperation.h.

42{ _required_for_backward = false; }

◆ disableWeightsUpdate()

void onert::ir::train::TrainableOperation::disableWeightsUpdate ( )
inlinefinalvirtual

Implements onert::ir::train::ITrainableOperation.

Definition at line 35 of file TrainableOperation.h.

35{ _trainable = false; }

◆ enableBackward()

void onert::ir::train::TrainableOperation::enableBackward ( )
inlinefinalvirtual

Implements onert::ir::train::ITrainableOperation.

Definition at line 41 of file TrainableOperation.h.

41{ _required_for_backward = true; }

◆ enableWeightsUpdate()

void onert::ir::train::TrainableOperation::enableWeightsUpdate ( )
inlinefinalvirtual

Implements onert::ir::train::ITrainableOperation.

Definition at line 37 of file TrainableOperation.h.

37{ _trainable = true; }

◆ isRequiredForBackward()

◆ isWeightsUpdateEnabled()

virtual bool onert::ir::train::TrainableOperation::isWeightsUpdateEnabled ( ) const
inlinefinalvirtual

Implements onert::ir::train::ITrainableOperation.

Definition at line 39 of file TrainableOperation.h.

39{ return _trainable; }

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