digitalmars.D.learn - Flaoting point operations : unexpected results
- seany (12/12) Jun 10 2021 I have (as mentioned before) an AI project in D.
- Dennis (2/4) Jun 10 2021 Are you using uninitialized memory or multi-threading?
- seany (14/18) Jun 10 2021 I am using things like :
- Alain De Vos (3/3) Jun 10 2021 Normally computers are deterministic and same input produces same
- frame (5/14) Jun 11 2021 Just to clarify, this statement does not initialize double values
I have (as mentioned before) an AI project in D. It is doing several million Floating Point operations. However, i sometimes see, that the results are _radically_ different. The same input, fed to the same system . I do not have and random values. There are some *foreach* loops. By radically different, i mean, that the computation whether some points are within some bound or not goes completely out of control. Sometimes they produce correct result, sometimes all results are zero. Is there a "reproducability" problem? Thank you.
Jun 10 2021
On Thursday, 10 June 2021 at 19:37:36 UTC, seany wrote:However, i sometimes see, that the results are _radically_ different.Are you using uninitialized memory or multi-threading?
Jun 10 2021
On Thursday, 10 June 2021 at 19:51:51 UTC, Dennis wrote:On Thursday, 10 June 2021 at 19:37:36 UTC, seany wrote:I am using things like : `double [][] myArr = new double [][] (0,0);` and `double [][] tempArr;` and class myclass { int a ; this(){} ~this(){} } followed by : myclass mc = new myclass; I dont think these are "uninitialized"?However, i sometimes see, that the results are _radically_ different.Are you using uninitialized memory or multi-threading?
Jun 10 2021
Normally computers are deterministic and same input produces same output. There is however theory on neural network stability and it can be tuned.
Jun 10 2021
On Thursday, 10 June 2021 at 20:18:03 UTC, seany wrote:On Thursday, 10 June 2021 at 19:51:51 UTC, Dennis wrote:On Thursday, 10 June 2021 at 19:37:36 UTC, seany wrote:I am using things like : `double [][] myArr = new double [][] (0,0);`However, i sometimes see, that the results are _radically_ different.Are you using uninitialized memory or multi-threading?I dont think these are "uninitialized"?Just to clarify, this statement does not initialize double values to 0. It just creates the array with lengths of 0. If you disable range checking as in release mode, you wouldn't see any error here.
Jun 11 2021