On Wed, Mar 7, 2018 at 1:10 PM, Marko Asplund <marko.aspl...@gmail.com>
wrote:
>
> However, the results look very different when using random initialization.
> With respect to exact cost this is course expected, but what I find
troublesome
> is that  after N training iterations the cost starts approaching zero
with the NumPy
> code (most of of the time), whereas with the Scala based implementations
cost fails
> to converge (most of the time).
>
> With NumPy I'm simply using the following random initilization code:
>
> np.random.randn(n_h, n_x) * 0.01
>
> I'm trying to emulate the same behaviour in my Scala code by  sampling
from a
> Gaussian distribution with mean = 0 and std dev = 1.

`np.random.randn(n_h, n_x) * 0.01`  gives a Gaussian distribution of mean=0
and stdev=0.01

--
Robert Kern
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion

Reply via email to