ONE - On-device Neural Engine
|
#include <ElementwiseActivationLayer.h>
Public Member Functions | |
ElementwiseActivationLayer () | |
void | configureBackward (const IPortableTensor *input, IPortableTensor *back_prop_input, const IPortableTensor *back_prop_output, float alpha, float beta, ElementwiseActivationType op_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::ElementwiseActivationLayer | |
ElementwiseActivationLayer () | |
void | configure (const IPortableTensor *input, IPortableTensor *output, float alpha, float beta, const ElementwiseActivationType op_type) |
void | run () override |
void | PopulateLookupTable (const ElementwiseActivationType op_type) |
void | EvalUsingLookupTable (const IPortableTensor *input, IPortableTensor *output) |
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::ElementwiseActivationLayer | |
const IPortableTensor * | _input |
IPortableTensor * | _output |
uint8_t | _table [256] |
std::function< void(const IPortableTensor *input, IPortableTensor *output)> | _kernel |
Definition at line 39 of file ElementwiseActivationLayer.h.
onert::backend::train::ops::ElementwiseActivationLayer::ElementwiseActivationLayer | ( | ) |
Definition at line 33 of file ElementwiseActivationLayer.cc.
|
overridevirtual |
Implements onert::exec::train::ITrainableFunction.
Definition at line 94 of file ElementwiseActivationLayer.cc.
References onert::backend::cpu::ops::ElementwiseActivationLayer::_output.
void onert::backend::train::ops::ElementwiseActivationLayer::configureBackward | ( | const IPortableTensor * | input, |
IPortableTensor * | back_prop_input, | ||
const IPortableTensor * | back_prop_output, | ||
float | alpha, | ||
float | beta, | ||
ElementwiseActivationType | op_type | ||
) |
Definition at line 38 of file ElementwiseActivationLayer.cc.
References onert::backend::train::ops::getShape(), onert::backend::train::ops::kReLU, nnfw::cker::train::ReLU6Grad(), and nnfw::cker::train::ReLUGrad().
|
overridevirtual |
Implements onert::exec::train::ITrainableFunction.
Definition at line 92 of file ElementwiseActivationLayer.cc.
References onert::backend::cpu::ops::ElementwiseActivationLayer::run().