Re: Flaoting point operations : unexpected results
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: However, i sometimes see, that the results are _radically_ different. Are you using uninitialized memory or multi-threading? I am using things like : `double [][] myArr = new double [][] (0,0);` 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.
Re: Flaoting point operations : unexpected results
Normally computers are deterministic and same input produces same output. There is however theory on neural network stability and it can be tuned.
Re: Flaoting point operations : unexpected results
On Thursday, 10 June 2021 at 19:51:51 UTC, Dennis wrote: 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? 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"?
Re: Flaoting point operations : unexpected results
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?
Flaoting point operations : unexpected results
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.