Remove unnecessary cast

The cast to int32 is not needed here.
This commit is contained in:
luxupu 2019-03-05 23:40:50 -08:00 committed by GitHub
parent afab5b322f
commit d389081508
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -85,9 +85,8 @@ inline void Softmax(const SoftmaxParams& params,
(shifted_scale * exp_in_0).raw(), num_bits_over_unit + 31 - 8);
const int32 shifted_output = unsat_output - 128;
output_data[i * depth + c] = static_cast<int8>(
std::max(std::min(shifted_output, static_cast<int32>(127)),
static_cast<int32>(-128)));
output_data[i * depth + c] =
static_cast<int8>(std::max(std::min(shifted_output, 127),-128));
} else {
output_data[i * depth + c] = -128;