def __init__(self, seed=None):
super(RandomStreams, self).__init__()
# A list of pairs of the form (input_r, output_r). This will be
# over-ridden by the module instance to contain stream generators.
self.state_updates = []
# Instance variable should take None or integer value. Used to seed the
# random number generator that provides seeds for member streams.
self.default_instance_seed = seed
# numpy.RandomState instance that gen() uses to seed new streams.
self.gen_seedgen = numpy.random.RandomState(seed)
shared_randomstreams.py 文件源码
python
阅读 25
收藏 0
点赞 0
评论 0
评论列表
文章目录