These are chat archives for libmir/public

10th
Dec 2017
Mathias L. Baumann
@Marenz
Dec 10 2017 02:29
I am trying to port a python example for a neural net with a hidden layer to D2/mir
And.. everything seems to be working, only that it.. doesn't
As far as I can tell, my code is identical
It's a lot to ask to compare those and get feedback on the code, so I understand if you feel like you don't want to ;)-
I just thought I try asking here because I am a bit out of ideas currently
Ilya Yaroshenko
@9il
Dec 10 2017 03:23
Hi Mathias,
I would suggest to do step by step verification. It is common for SCI code to do so.
After quick review i found one small bug (but there may be also others): Random gen is not initialized.
You may want to use https://github.com/libmir/mir-random as wall as https://github.com/libmir/numir to generate random slices. Mir Random has default contrcuttor disabled for RNGs, so it is safer then Phobos.
Mathias L. Baumann
@Marenz
Dec 10 2017 11:36
it actually is, here: https://github.com/Marenz/neural_net_examples/blob/master/lstm/source/app.d#L64 if you mean seed when you say initialized?
I tried to construct it in a way that it matches the random numbers generated in python
I got surprisingly close
to see where it starts diverging
but there was no clear point
Ilya Yaroshenko
@9il
Dec 10 2017 11:44
Ah, ok. BTW keep in mind that gen is TLS variable
Mathias L. Baumann
@Marenz
Dec 10 2017 12:01
I don't plan on more threads yet :)