On Thu, Mar 8, 2018 at 12:44 PM, Marko Asplund <marko.aspl...@gmail.com> wrote: > > 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.
Have you verified this? I.e. save out the Scala-initialized network and load it up with numpy to check the mean and std dev? How about if you run the numpy NN training with the Scala-initialized network? Does that also diverge? -- Robert Kern
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion