Closed milancurcic closed 1 year ago
Hello @milancurcic, In x(i) = x(i) * 2
we are multiplying by 2 because it expands the range of x(i) from [0, 1] to [0, 2], and also it ensures that the input values (x) are uniformly distributed.
Thanks, I must be seeing double today. :)
@Spnetic-5 I meant to ask this in the PR but I forgot: Why do you square the input to the quadratic function in the example:
https://github.com/modern-fortran/neural-fortran/blob/adaf9bb28033a643cf68da40a64586ffe2184439/example/quadratic.f90#L34-L39
random_number
samplesx
from a uniform distribution, and squaringx
will skew the distribution toward low values. Did you intend to do this and why? It seems to me that we'd want to have a uniform distribution in the inputs.