ONE - On-device Neural Engine
|
#include <BinaryArithmeticLayer.h>
Public Member Functions | |
BinaryArithmeticLayer () | |
void | configureBackward (IPortableTensor *back_prop_lhs, IPortableTensor *back_prop_rhs, const IPortableTensor *back_prop_output, const ir::Activation activation, const ArithmeticType arithmetic_type) |
void | forward (bool training) override |
void | backward () override |
Public Member Functions inherited from onert::exec::train::ITrainableFunction | |
virtual | ~ITrainableFunction ()=default |
virtual std::optional< backend::train::LayerScopeTensors > | registerLayerScopeTensors () |
Public Member Functions inherited from onert::backend::cpu::ops::BinaryArithmeticLayer | |
BinaryArithmeticLayer () | |
void | configure (const IPortableTensor *lhs, const IPortableTensor *rhs, IPortableTensor *output, const ir::Activation activation, const ArithmeticType arithmetic_type) |
void | run () override |
Public Member Functions inherited from onert::exec::IFunction | |
virtual | ~IFunction ()=default |
virtual void | prepare () |
Additional Inherited Members | |
Protected Attributes inherited from onert::backend::cpu::ops::BinaryArithmeticLayer | |
const IPortableTensor * | _lhs |
const IPortableTensor * | _rhs |
IPortableTensor * | _output |
std::function< void(const IPortableTensor *, const IPortableTensor *, IPortableTensor *)> | _kernel |
Definition at line 43 of file BinaryArithmeticLayer.h.
onert::backend::train::ops::BinaryArithmeticLayer::BinaryArithmeticLayer | ( | ) |
Definition at line 36 of file BinaryArithmeticLayer.cc.
|
overridevirtual |
Implements onert::exec::train::ITrainableFunction.
Definition at line 65 of file BinaryArithmeticLayer.cc.
References onert::backend::cpu::ops::BinaryArithmeticLayer::_lhs, onert::backend::cpu::ops::BinaryArithmeticLayer::_output, onert::backend::cpu::ops::BinaryArithmeticLayer::_rhs, onert::backend::train::ops::backpropActivation(), nnfw::cker::train::BinaryArithmeticGrad(), onert::backend::IPortableTensor::data_type(), and onert::backend::train::ops::getShape().
void onert::backend::train::ops::BinaryArithmeticLayer::configureBackward | ( | IPortableTensor * | back_prop_lhs, |
IPortableTensor * | back_prop_rhs, | ||
const IPortableTensor * | back_prop_output, | ||
const ir::Activation | activation, | ||
const ArithmeticType | arithmetic_type | ||
) |
Definition at line 44 of file BinaryArithmeticLayer.cc.
References onert::backend::cpu::ops::BinaryArithmeticLayer::_output, onert::backend::IPortableTensor::get_info(), onert::ir::NONE, and onert::backend::IPortableTensor::total_size().
|
overridevirtual |
Implements onert::exec::train::ITrainableFunction.
Definition at line 63 of file BinaryArithmeticLayer.cc.
References onert::backend::cpu::ops::BinaryArithmeticLayer::run().