diff --git a/tensorflow/lite/kernels/internal/tensor_utils.h b/tensorflow/lite/kernels/internal/tensor_utils.h index 33163027ca3..b515949bb29 100644 --- a/tensorflow/lite/kernels/internal/tensor_utils.h +++ b/tensorflow/lite/kernels/internal/tensor_utils.h @@ -186,7 +186,7 @@ void ApplyLayerNorm(const int16_t* input, const int16_t* layer_norm_weights, int32_t layer_norm_scale_b, int32_t variance_limit, int n_batch, int n_input, int16_t* output); -// Apply Sigmoid to a Quantized vector. +// Apply Sigmoid to a quantized vector. // Parameters: // - input: batch vector of size n_batch * n_input; 16 bit. // - n_batch: the number of batch. @@ -196,7 +196,7 @@ void ApplyLayerNorm(const int16_t* input, const int16_t* layer_norm_weights, void ApplySigmoid(const int16_t* input, int32_t n_batch, int32_t n_input, int16_t* output); -// Apply Tanh to a Quantized vector. +// Apply Tanh to a quantized vector. // Parameters: // - input: batch vector of size n_batch * n_input; 16 bit. // - n_batch: the number of batch. @@ -206,6 +206,13 @@ void ApplySigmoid(const int16_t* input, int32_t n_batch, int32_t n_input, void ApplyTanh0(const int16_t* input, int32_t n_batch, int32_t n_input, int16_t* output); +// Apply Tanh to a quantized vector. +// Parameters: +// - input: batch vector of size n_batch * n_input; 16 bit. +// - n_batch: the number of batch. +// - n_input: the size for input and output. +// - output: the 16 bit output +// The input is in Q3.12 format and the output is in Q0.15 format. void ApplyTanh3(const int16_t* input, int32_t n_batch, int32_t n_input, int16_t* output);