mltk.core.TfliteActivation¶
- class TfliteActivation[source]¶
Activation types
This may be instantiated with either an integer OR string, e.g.:
activation = TfliteActivation(0) activation = TfliteActivation('relu')
Properties
No activation, linear pass through
Rectified Linear Unit, f(x) = max(0, x)
Rectified Linear Unit, -1 to 1, f(x) = min(max(-1, x), 1)
Rectified Linear Unit, 0 to 6, f(x) = min(max(0, x), 6)
Hyperbolic Tangent, f(x) = tanh(x)
Sigmoid, f(x) = e^x / (e^x + 1)
Methods
Return the activation as a string
- NONE = 0¶
No activation, linear pass through
- RELU = 1¶
Rectified Linear Unit, f(x) = max(0, x)
- RELU_N1_TO_1 = 2¶
Rectified Linear Unit, -1 to 1, f(x) = min(max(-1, x), 1)
- RELU6 = 3¶
Rectified Linear Unit, 0 to 6, f(x) = min(max(0, x), 6)
- TANH = 4¶
Hyperbolic Tangent, f(x) = tanh(x)
- SIGN_BIT = 5¶
Sigmoid, f(x) = e^x / (e^x + 1)