|
ONE - On-device Neural Engine
|
#include <ElementwiseActivationLayer.h>

Public Member Functions | |
| ElementwiseActivationLayer () | |
| void | configure (const IPortableTensor *input, IPortableTensor *output, float alpha, float beta, bool approximate, 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 37 of file ElementwiseActivationLayer.h.
| onert::backend::cpu::ops::ElementwiseActivationLayer::ElementwiseActivationLayer | ( | ) |
Definition at line 79 of file ElementwiseActivationLayer.cc.
| void onert::backend::cpu::ops::ElementwiseActivationLayer::configure | ( | const IPortableTensor * | input, |
| IPortableTensor * | output, | ||
| float | alpha, | ||
| float | beta, | ||
| bool | approximate, | ||
| const ElementwiseActivationType | op_type | ||
| ) |
Definition at line 129 of file ElementwiseActivationLayer.cc.
References _input, _kernel, _output, onert::backend::IPortableTensor::data_type(), nnfw::cker::ELU(), EvalUsingLookupTable(), nnfw::cker::GELU(), onert::backend::cpu::ops::getShape(), onert::backend::cpu::ops::kElu, onert::backend::cpu::ops::kGELU, 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 116 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 85 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 249 of file ElementwiseActivationLayer.cc.
References _input, _kernel, and _output.
Referenced by onert::backend::train::ops::ElementwiseActivationLayer::forward().
|
protected |
Definition at line 53 of file ElementwiseActivationLayer.h.
Referenced by configure(), PopulateLookupTable(), and run().
|
protected |
Definition at line 56 of file ElementwiseActivationLayer.h.
Referenced by configure(), and run().
|
protected |
Definition at line 54 of file ElementwiseActivationLayer.h.
Referenced by onert::backend::train::ops::ElementwiseActivationLayer::backward(), configure(), PopulateLookupTable(), and run().
|
protected |
Definition at line 55 of file ElementwiseActivationLayer.h.
Referenced by EvalUsingLookupTable(), and PopulateLookupTable().