On Wed, 7 Mar 2018 13:14:36, Robert Kern wrote:

> > 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

Sorry for being a bit inaccurate.
My Scala code actually mirrors the NumPy based random initialization, so I
sample with Gaussian of mean = 0 and std dev = 1, then multiply with 0.01.
Despite the extra step the result should be the same as with the NumPy code
above.

Is there anything else that could be different with the random
initilization methods?


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

Reply via email to