diff options
| author | tslil clingman <tslil@posteo.de> | 2021-01-26 00:24:03 -0500 |
|---|---|---|
| committer | tslil <tslil@posteo.de> | 2026-08-28 19:37:41 +0100 |
| commit | 9131e08817ae2f3bd58a8a0ba9f1e692ceb8604c (patch) | |
| tree | 67ee90f033ad3f3c5f09e7a911f5379c4d45ca51 /include/cnn1986.c | |
| parent | 9c151da7ce0d00ecf04e4be9c395604d4c8882ad (diff) | |
There is still a bug, it doesn't appear to be checking enough
Diffstat (limited to 'include/cnn1986.c')
| -rw-r--r-- | include/cnn1986.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/include/cnn1986.c b/include/cnn1986.c index 17d4e84..ada1766 100644 --- a/include/cnn1986.c +++ b/include/cnn1986.c @@ -9,21 +9,6 @@ static float flattened[CONV_NUM+2]; static float dense1[DENSE1_NUM]; static float dense2[DENSE2_NUM]; -#ifndef DETERMINISTIC -union u_f { - uint32_t u; - float f; -}; - -static union u_f fudge; - -#define RANDF { \ - XORSHIFT; \ - fudge.u = 0x3f800000 | RANDOM32 >> 10; \ - fudge.f = (fudge.f - 1.5) * 0.01; \ - } -#endif - #define RELU(x) ((x) = ((x)<0)?0:(x)) float cnn1986_evaluate_black_win(void) { @@ -100,12 +85,6 @@ float cnn1986_evaluate_black_win(void) { } // Truncated Pade approximant of logistic function output = (12.0+output+50.0*output/(output*output+10.0))/24.0; -/* - * #ifndef DETERMINISTIC - * RANDF; - * output += fudge.f; - * #endif - */ if (output > 1.0) { return 1.0; } |
