Small formatting improvements

Changes some C style casts to C++ style, and fixes some incorrect comments and variable names.

closes #4845

No functional change
This commit is contained in:
cj5716
2023-10-24 07:43:49 +08:00
committed by Joost VandeVondele
parent 49ece9f791
commit d6a5c2b085
5 changed files with 16 additions and 16 deletions

View File

@@ -93,7 +93,7 @@ class SqrClippedReLU {
output[i] = static_cast<OutputType>(
// Really should be /127 but we need to make it fast so we right shift
// by an extra 7 bits instead. Needs to be accounted for in the trainer.
std::min(127ll, ((long long) input[i] * input[i]) >> (2 * WeightScaleBits + 7)));
std::min(127ll, ((long long) (input[i]) * input[i]) >> (2 * WeightScaleBits + 7)));
}
}
};