theano/sandbox/rng_mrg.py
def seed(self, seed=None):
        """
        Re-initialize each random stream.

        Parameters
        ----------
        seed : None or integer in range 0 to 2**30
            Each random stream will be assigned a unique state that depends
            deterministically on this value.

        Returns
        -------
        None

        """
        if seed is None:
            seed = self.default_instance_seed
        self.set_rstate(seed)

        for old_r, new_r, size, nstreams in self.state_updates:
            if nstreams is None:
                nstreams = self.n_streams(size)
            rstates = self.get_substream_rstates(nstreams,
                                                 new_r.owner.outputs[1].dtype)
            assert (old_r.get_value(borrow=True,
                                    return_internal_type=True).shape ==
                    rstates.shape)
            assert rstates.dtype == old_r.dtype
            old_r.set_value(rstates, borrow=True)

        Re-initialize each random stream.

        Parameters
        ----------
        seed : None or integer in range 0 to 2**30
            Each random stream will be assigned a unique state that depends
            deterministically on this value.

        Returns
        -------
        None

        
Re-initialize each random stream.
Parameters

seed : None or integer in range 0 to 2**30
Each random stream will be assigned a unique state that depends
deterministically on this value.

Returns

None
Re - initialize each random stream . Parameters seed : None or integer in range 0 to 2 ** 30 Each random stream will be assigned a unique state that depends deterministically on this value . Returns None
def seed(self, seed=None):
        if seed is None:
            seed = self.default_instance_seed
        self.set_rstate(seed)
        for old_r, new_r, size, nstreams in self.state_updates:
            if nstreams is None:
                nstreams = self.n_streams(size)
            rstates = self.get_substream_rstates(nstreams,
                                                 new_r.owner.outputs[1].dtype)
            assert (old_r.get_value(borrow=True,
                                    return_internal_type=True).shape ==
                    rstates.shape)
            assert rstates.dtype == old_r.dtype
            old_r.set_value(rstates, borrow=True)
def seed ( self , seed = None ) : if seed is None : seed = self . default_instance_seed self . set_rstate ( seed ) for old_r , new_r , size , nstreams in self . state_updates : if nstreams is None : nstreams = self . n_streams ( size ) rstates = self . get_substream_rstates ( nstreams , new_r . owner . outputs [ 1 ] . dtype ) assert ( old_r . get_value ( borrow = True , return_internal_type = True ) . shape == rstates . shape ) assert rstates . dtype == old_r . dtype old_r . set_value ( rstates , borrow = True )
Re-initialize each random stream.
Re - initialize each random stream .
"""
        Re-initialize each random stream.

        Parameters
        ----------
        seed : None or integer in range 0 to 2**30
            Each random stream will be assigned a unique state that depends
            deterministically on this value.

        Returns
        -------
        None

        """
self
seed