ONE - On-device Neural Engine
Loading...
Searching...
No Matches
mir_interpreter::TanhImpl< T > Struct Template Reference

Static Public Member Functions

static void run (const mir::TensorVariant &arg, mir::TensorVariant &result)
 

Detailed Description

template<typename T>
struct mir_interpreter::TanhImpl< T >

Definition at line 28 of file Tanh.cpp.

Member Function Documentation

◆ run()

template<typename T >
void mir_interpreter::TanhImpl< T >::run ( const mir::TensorVariant arg,
mir::TensorVariant result 
)
static

Definition at line 34 of file Tanh.cpp.

35{
36 mir::Tensor<T> arg_accessor(arg);
37 mir::Tensor<T> res_accessor(result);
38
39 for (const auto &index : mir::ShapeRange(result.getShape()))
40 {
41 res_accessor.at(index) = std::tanh(arg_accessor.at(index));
42 }
43}
result
Definition infer.py:103
nnfw::cker::Shape getShape(const IPortableTensor *tensor)

References mir::Tensor< T >::at().

Referenced by package.infer.session::inference().


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