MCPcopy Create free account
hub / github.com/OAID/Tengine / activation

Function activation

executor/operator/ref/kernel/convolution/ref_conv_kernel.h:53–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51};
52
53static inline float activation(float input, int activation)
54{
55 if(activation >= 0)
56 {
57 if(input < 0 && activation != 1)
58 input = 0;
59 if(activation == 1 && input > 1)
60 input = 1;
61 if(activation == 6 && input > 6)
62 input = 6;
63 if(activation == 1 && input < -1)
64 input = -1;
65 }
66
67 return input;
68}
69
70typedef int (*ref_conv_kernel_t)(const void* input, void* output, const void* kernel, const void* bias, op_data* param);
71

Callers 4

ref_conv_fp16Function · 0.70
ref_conv_int8Function · 0.70
ref_conv_fp32Function · 0.70
ref_conv_uint8Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected