message: Added/changed some comments
diff: @@ -144,11 +144,13 @@ inline void Softmax(const SoftmaxParams& params,
  }
  }
  +// Computes exp(input - max_input)
  inline int16_t SoftMaxCalculateExp(const SoftmaxParams& params,
  const int16_t* input_data, const int depth,
  int16_t max_in_row, int i, int c) {
  int32_t input_diff = input_data[i * depth + c] - max_in_row;
  // scale the input_diff such that [-65535, 0] correspond to [-10.0, 0.0]
  + // exp lut generated with range [-10, 0], as exp(-10) is negligible.
  int32_t scaled_diff = MultiplyByQuantizedMultiplier(
  input_diff, params.input_multiplier, params.input_left_shift);
  // recenter to [-32768, 32767]
  @@ -178,10 +180,11 @@ inline void SoftmaxInt16(const SoftmaxParams& params,
  max_in_row = std::max(max_in_row, input_data[i * depth + c]);
  }
  - // Compute exp(input - max_input)
  - // sum_of_exps is a Q16.15 fixed point format.
  - //the output buffer is used as scratch memory and overwritten when the results are written.
  - int32_t sum_of_exps = 0;
  + // This loops computes the exp values and their sum. We will need the exp
  + // values later on in the function so we cache them in the output_data
  + // buffer. This is an optimization done to avoid calculating the exp values
  + // twice making use of the output_data buffer as scratch memory.
  + int32_t sum_of_exps = 0; // Q16.15 fixed point format.
  int16_t* exp_results_Q015 = output_data + i * depth;
  for (int c = 0; c < depth; ++c) {
  exp_results_Q015[c] =
  