Thanks for your answer.
Though I get very consistent outputs every time I run the code, when class _net2 is not defined.
I guess I see, that defining a new module anywhere probably changes the behaviour of random generator.