31float fastexp2(
float val,
int precision);
41template <
int INP_H,
int INP_W,
int INP_W_PAD>
44 float coef[10] = {1, 0.5, 0.16666666666666666, 0.041666666666666664, 0.008333333333333333, 0.001388888888888889, 0.0001984126984126984, 2.48015873015873e-05, 2.7557319223985893e-06, 2.755731922398589e-07};
50 float fastexp3(
float val,
int precision);
54 input_window<float>* in,
55 output_window<float>* out
58 static void registerKernelClass() {
59 REGISTER_FUNCTION(SoftmaxScalar::filter);
69template <
int INP_H,
int INP_W,
int INP_W_PAD>
73 input_window<float>* in,
74 output_window<float>* out
77 static void registerKernelClass() {
78 static_assert(INP_W_PAD % 8 == 0);
79 REGISTER_FUNCTION(SoftmaxSingleaxis::filter);
89template <
int INP_H,
int INP_W,
int INP_W_PAD>
93 input_window<float>* in,
94 output_window<float>* out
97 static void registerKernelClass() {
98 static_assert(INP_H % 2 == 0 && INP_W_PAD % 8 == 0);
99 REGISTER_FUNCTION(SoftmaxMultiaxis::filter);
Vector implementation for multiple axis, SoftmaxMultiaxis<10,10,16> takes 1082 cycles requires INP_H%...
Definition softmax.h:90
Scalar implementation, SoftmaxScalar<10,10,16> takes.
Definition softmax.h:42
Vector implementation for single axis, SoftmaxSingleaxis<10,10,16> takes 1241 cycles requires INP_W_P...
Definition softmax.h:70
float fastexp2(float val, int precision)
approximation with (1 + x/256)^256 Error is small for [-512. 1.5]
Definition qlinearsoftmax.cc:11
double fastexp(float val)
See https://nic.schraudolph.org/pubs/Schraudolph99.pdf.
Definition softmax.cc:9