def test_random_state_transfer():
    class Graph:
        def __init__(self, seed=123):
            self.rng = MRG_RandomStreams(seed)
            self.y = self.rng.uniform(size=(1,))
    g1 = Graph(seed=123)
    f1 = theano.function([], g1.y)
    g2 = Graph(seed=987)
    f2 = theano.function([], g2.y)

    g2.rng.rstate = g1.rng.rstate
    for (su1, su2) in zip(g1.rng.state_updates, g2.rng.state_updates):
        su2[0].set_value(su1[0].get_value())

    numpy.testing.assert_array_almost_equal(f1(), f2(), decimal=6)
Start a server instance. This method blocks until the server terminates.
dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/sandbox/tests/test_rng_mrg.py/test_random_state_transfer--crossover with--dataset/ETHPy150Open adampresley/bottlepy-bootstrap/app/bottle.py/run