ONE - On-device Neural Engine
|
#include <ElementwiseActivationLayer.h>
Public Member Functions | |
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 () |
Protected Attributes | |
const IPortableTensor * | _input |
IPortableTensor * | _output |
uint8_t | _table [256] |
std::function< void(const IPortableTensor *input, IPortableTensor *output)> | _kernel |
Definition at line 42 of file ElementwiseActivationLayer.h.
onert::backend::cpu::ops::ElementwiseActivationLayer::ElementwiseActivationLayer | ( | ) |
Definition at line 37 of file ElementwiseActivationLayer.cc.
void onert::backend::cpu::ops::ElementwiseActivationLayer::configure | ( | const IPortableTensor * | input, |
IPortableTensor * | output, | ||
float | alpha, | ||
float | beta, | ||
const ElementwiseActivationType | op_type | ||
) |
Definition at line 87 of file ElementwiseActivationLayer.cc.
References _input, _kernel, _output, onert::backend::IPortableTensor::data_type(), nnfw::cker::ELU(), EvalUsingLookupTable(), onert::backend::cpu::ops::getShape(), onert::backend::cpu::ops::kElu, onert::backend::cpu::ops::kLeakyReLU, onert::backend::cpu::ops::kLogistic, onert::backend::cpu::ops::kReLU, onert::backend::cpu::ops::kTanh, nnfw::cker::LeakyReLU(), nnfw::cker::Logistic(), PopulateLookupTable(), nnfw::cker::ReLU(), nnfw::cker::ReLU6(), and nnfw::cker::Tanh().
void onert::backend::cpu::ops::ElementwiseActivationLayer::EvalUsingLookupTable | ( | const IPortableTensor * | input, |
IPortableTensor * | output | ||
) |
Definition at line 74 of file ElementwiseActivationLayer.cc.
References _table, onert::backend::cpu::ops::getShape(), MatchingFlatSize(), and size.
Referenced by configure().
void onert::backend::cpu::ops::ElementwiseActivationLayer::PopulateLookupTable | ( | const ElementwiseActivationType | op_type | ) |
Definition at line 43 of file ElementwiseActivationLayer.cc.
References _input, _output, _table, onert::backend::IPortableTensor::data_scale(), onert::backend::IPortableTensor::data_zero_point(), onert::backend::cpu::ops::kLogistic, and onert::backend::cpu::ops::kTanh.
Referenced by configure().
|
overridevirtual |
Implements onert::exec::IFunction.
Definition at line 194 of file ElementwiseActivationLayer.cc.
References _input, _kernel, and _output.
Referenced by onert::backend::train::ops::ElementwiseActivationLayer::forward(), and package.infer.session::inference().
|
protected |
Definition at line 58 of file ElementwiseActivationLayer.h.
Referenced by configure(), PopulateLookupTable(), and run().
|
protected |
Definition at line 61 of file ElementwiseActivationLayer.h.
Referenced by configure(), and run().
|
protected |
Definition at line 59 of file ElementwiseActivationLayer.h.
Referenced by onert::backend::train::ops::ElementwiseActivationLayer::backward(), configure(), PopulateLookupTable(), and run().
|
protected |
Definition at line 60 of file ElementwiseActivationLayer.h.
Referenced by EvalUsingLookupTable(), and PopulateLookupTable().