FauziAkram
2023-12-30 15:22:17 +03:00
committed by Disservin
parent 4f99dfcae2
commit 833a2e2bc0
11 changed files with 37 additions and 37 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ class SqrClippedReLU {
for (IndexType i = Start; i < InputDimensions; ++i)
{
output[i] = static_cast<OutputType>(
// Really should be /127 but we need to make it fast so we right shift
// 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)));
}