MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Tanh

Function Tanh

tensorflow/lite/kernels/internal/reference/reference_ops.h:1976–1985  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1974}
1975
1976inline void Tanh(const RuntimeShape& input_shape, const float* input_data,
1977 const RuntimeShape& output_shape, float* output_data) {
1978 const int flat_size = MatchingFlatSize(input_shape, output_shape);
1979
1980 for (int i = 0; i < flat_size; i++) {
1981 float val = input_data[i];
1982 float result = std::tanh(val);
1983 output_data[i] = result;
1984 }
1985}
1986
1987// Convenience version that allows, for example, generated-code calls to be
1988// uniform between data types.

Callers

nothing calls this directly

Calls 2

MatchingFlatSizeFunction · 0.85
tanhFunction · 0.50

Tested by

no test coverage detected