Home
last modified time | relevance | path

Searched refs:sum_exp (Results 1 – 4 of 4) sorted by relevance

/external/XNNPACK/test/
Dsoftmax-operator-tester.h132 float sum_exp = 0.0f; in TestQU8() local
134 sum_exp += in TestQU8()
142 (sum_exp * output_scale()); in TestQU8()
198 double sum_exp = 0.0; in TestF32() local
200 sum_exp += std::exp(double(input[i * input_stride() + c]) - max_input); in TestF32()
204 std::exp(double(input[i * input_stride() + c]) - max_input) / sum_exp; in TestF32()
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dsoftmax_op.cc143 auto sum_exp = XlaHelpers::ConvertElementType(reduce, type); in CrossEntropyWithLogits() local
146 auto log_sum_exp = xla::Log(sum_exp); in CrossEntropyWithLogits()
167 xla::Sub(xla::Div(exp_shifted_logits, sum_exp, {kBatchDim}), labels); in CrossEntropyWithLogits()
/external/tensorflow/tensorflow/core/kernels/sparse/
Dkernels_gpu.cu.cc358 T sum_exp = 0; in CalculateRowSoftmax() local
362 sum_exp += exp_i; in CalculateRowSoftmax()
365 softmax[r_i] = softmax[r_i] / sum_exp; in CalculateRowSoftmax()
/external/tensorflow/tensorflow/lite/kernels/internal/optimized/
Doptimized_ops.h3781 float sum_exp = 0.0f; in Softmax() local
3786 sum_exp += table_offset[input_data[j]]; in Softmax()
3789 const float inv_sum_exp = 1.0f / (sum_exp * params.scale); in Softmax()
3951 int32 sum_exp = 0; in SoftmaxInt8LUT() local
3983 sum_exp += temp; in SoftmaxInt8LUT()
3991 sum_exp += ((part1 << 8) + part2); in SoftmaxInt8LUT()
3994 const float inv_sum_exp = 1.0f / (sum_exp * params.scale); in SoftmaxInt8LUT()
4138 float sum_exp = 0.0f; in LogSoftmax() local
4145 sum_exp += table_offset[input_data[j]]; in LogSoftmax()
4147 const float log_sum_exp = std::log(sum_exp); in LogSoftmax()