ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert::ir::train::operation::UntrainableOperation< OperationType, typename > Class Template Reference

#include <UntrainableOperation.h>

Collaboration diagram for onert::ir::train::operation::UntrainableOperation< OperationType, typename >:

Public Member Functions

 UntrainableOperation (const OperationType &operation)
 
virtual ~UntrainableOperation ()=default
 
std::unique_ptr< ITrainableOperationclone () const override
 
void accept (OperationVisitor &v) const override
 
void accept (TrainableOperationVisitor &) const override
 
bool hasTrainableParameter () const override
 
- Public Member Functions inherited from onert::ir::train::TrainableOperation
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
 
- 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

template<typename OperationType, typename = std::enable_if_t<std::is_base_of<Operation, OperationType>::value>>
class onert::ir::train::operation::UntrainableOperation< OperationType, typename >

Definition at line 40 of file UntrainableOperation.h.

Constructor & Destructor Documentation

◆ UntrainableOperation()

template<typename OperationType , typename = std::enable_if_t<std::is_base_of<Operation, OperationType>::value>>
onert::ir::train::operation::UntrainableOperation< OperationType, typename >::UntrainableOperation ( const OperationType operation)
inline

Definition at line 43 of file UntrainableOperation.h.

43: OperationType{operation} {}
OperationType

◆ ~UntrainableOperation()

template<typename OperationType , typename = std::enable_if_t<std::is_base_of<Operation, OperationType>::value>>
virtual onert::ir::train::operation::UntrainableOperation< OperationType, typename >::~UntrainableOperation ( )
virtualdefault

Member Function Documentation

◆ accept() [1/2]

template<typename OperationType , typename = std::enable_if_t<std::is_base_of<Operation, OperationType>::value>>
void onert::ir::train::operation::UntrainableOperation< OperationType, typename >::accept ( OperationVisitor v) const
inlineoverridevirtual

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

Definition at line 51 of file UntrainableOperation.h.

51{ v.visit(*this); }

◆ accept() [2/2]

template<typename OperationType , typename = std::enable_if_t<std::is_base_of<Operation, OperationType>::value>>
void onert::ir::train::operation::UntrainableOperation< OperationType, typename >::accept ( TrainableOperationVisitor ) const
inlineoverridevirtual

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

Definition at line 52 of file UntrainableOperation.h.

53 {
54 throw std::runtime_error(OperationType::name() + " operation is not trainable yet");
55 }

◆ clone()

template<typename OperationType , typename = std::enable_if_t<std::is_base_of<Operation, OperationType>::value>>
std::unique_ptr< ITrainableOperation > onert::ir::train::operation::UntrainableOperation< OperationType, typename >::clone ( ) const
inlineoverridevirtual

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

Definition at line 47 of file UntrainableOperation.h.

48 {
49 return std::make_unique<UntrainableOperation<OperationType>>(*this);
50 }

◆ hasTrainableParameter()

template<typename OperationType , typename = std::enable_if_t<std::is_base_of<Operation, OperationType>::value>>
bool onert::ir::train::operation::UntrainableOperation< OperationType, typename >::hasTrainableParameter ( ) const
inlineoverridevirtual

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

Definition at line 56 of file UntrainableOperation.h.

56{ return false; }

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