提交 3c5b4282 authored 作者: Iban Harlouchet's avatar Iban Harlouchet

flake8 for tensor/shared_randomstreams.py

上级 5ef25dd6
"""Define RandomStreams, providing random number variables for Theano """Define RandomStreams, providing random number variables for Theano
graphs. graphs.
""" """
__docformat__ = "restructuredtext en"
import copy import copy
import numpy import numpy
from theano.compile.sharedvalue import (SharedVariable, shared_constructor, from theano.compile.sharedvalue import (SharedVariable, shared_constructor,
shared) shared)
from theano.tensor import raw_random from theano.tensor import raw_random
__docformat__ = "restructuredtext en"
class RandomStateSharedVariable(SharedVariable): class RandomStateSharedVariable(SharedVariable):
pass pass
...@@ -77,7 +79,7 @@ class RandomStreams(raw_random.RandomStreamsBase): ...@@ -77,7 +79,7 @@ class RandomStreams(raw_random.RandomStreamsBase):
for old_r, new_r in self.state_updates: for old_r, new_r in self.state_updates:
old_r_seed = seedgen.randint(2 ** 30) old_r_seed = seedgen.randint(2 ** 30)
old_r.set_value(numpy.random.RandomState(int(old_r_seed)), old_r.set_value(numpy.random.RandomState(int(old_r_seed)),
borrow=True) borrow=True)
def __getitem__(self, item): def __getitem__(self, item):
"""Retrieve the numpy RandomState instance associated with a """Retrieve the numpy RandomState instance associated with a
......
...@@ -57,7 +57,6 @@ whitelist_flake8 = [ ...@@ -57,7 +57,6 @@ whitelist_flake8 = [
"typed_list/tests/test_type.py", "typed_list/tests/test_type.py",
"typed_list/tests/test_opt.py", "typed_list/tests/test_opt.py",
"typed_list/tests/test_basic.py", "typed_list/tests/test_basic.py",
"tensor/shared_randomstreams.py",
"tensor/subtensor.py", "tensor/subtensor.py",
"tensor/elemwise.py", "tensor/elemwise.py",
"tensor/xlogx.py", "tensor/xlogx.py",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论