Make ApplyTanh3 function more readable. This function is different from the previous one in the input scale.
PiperOrigin-RevId: 269900289
This commit is contained in:
parent
959487fd0e
commit
bdcf4b6296
@ -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,
|
int32_t layer_norm_scale_b, int32_t variance_limit,
|
||||||
int n_batch, int n_input, int16_t* output);
|
int n_batch, int n_input, int16_t* output);
|
||||||
|
|
||||||
// Apply Sigmoid to a Quantized vector.
|
// Apply Sigmoid to a quantized vector.
|
||||||
// Parameters:
|
// Parameters:
|
||||||
// - input: batch vector of size n_batch * n_input; 16 bit.
|
// - input: batch vector of size n_batch * n_input; 16 bit.
|
||||||
// - n_batch: the number of batch.
|
// - 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,
|
void ApplySigmoid(const int16_t* input, int32_t n_batch, int32_t n_input,
|
||||||
int16_t* output);
|
int16_t* output);
|
||||||
|
|
||||||
// Apply Tanh to a Quantized vector.
|
// Apply Tanh to a quantized vector.
|
||||||
// Parameters:
|
// Parameters:
|
||||||
// - input: batch vector of size n_batch * n_input; 16 bit.
|
// - input: batch vector of size n_batch * n_input; 16 bit.
|
||||||
// - n_batch: the number of batch.
|
// - 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,
|
void ApplyTanh0(const int16_t* input, int32_t n_batch, int32_t n_input,
|
||||||
int16_t* output);
|
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,
|
void ApplyTanh3(const int16_t* input, int32_t n_batch, int32_t n_input,
|
||||||
int16_t* output);
|
int16_t* output);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user