提交 7f862fdc authored 作者: Olivier Delalleau's avatar Olivier Delalleau

PEP8 fixes

上级 5c576b65
...@@ -5,7 +5,8 @@ from theano import gof ...@@ -5,7 +5,8 @@ from theano import gof
from sharedvalue import SharedVariable from sharedvalue import SharedVariable
import logging import logging
_logger=logging.getLogger("theano.compile.io") _logger = logging.getLogger("theano.compile.io")
class SymbolicInput(object): class SymbolicInput(object):
""" """
...@@ -49,7 +50,7 @@ class SymbolicInput(object): ...@@ -49,7 +50,7 @@ class SymbolicInput(object):
def __init__(self, variable, name=None, update=None, mutable=None, def __init__(self, variable, name=None, update=None, mutable=None,
strict=False, allow_downcast=None, autoname=True, strict=False, allow_downcast=None, autoname=True,
implicit=False): implicit=False):
assert implicit is not None # Safety check. assert implicit is not None # Safety check.
self.variable = variable self.variable = variable
if (autoname and name is None): if (autoname and name is None):
self.name = variable.name self.name = variable.name
...@@ -194,8 +195,7 @@ class In(SymbolicInput): ...@@ -194,8 +195,7 @@ class In(SymbolicInput):
# try to keep it synchronized. # try to keep it synchronized.
def __init__(self, variable, name=None, value=None, update=None, def __init__(self, variable, name=None, value=None, update=None,
mutable=None, strict=False, allow_downcast=None, autoname=True, mutable=None, strict=False, allow_downcast=None, autoname=True,
implicit=None, borrow=None, shared = False): implicit=None, borrow=None, shared=False):
#if shared, an input's value comes from its persistent storage, not from a default stored #if shared, an input's value comes from its persistent storage, not from a default stored
#in the function or from the caller #in the function or from the caller
...@@ -206,7 +206,7 @@ class In(SymbolicInput): ...@@ -206,7 +206,7 @@ class In(SymbolicInput):
# mutable=True should require borrow=True. Raise warning when borrow is explicitely set # mutable=True should require borrow=True. Raise warning when borrow is explicitely set
# to False with mutable=True. # to False with mutable=True.
if mutable: if mutable:
if borrow==False: if borrow == False:
_logger.warning("Symbolic input for variable %s (name=%s) has " _logger.warning("Symbolic input for variable %s (name=%s) has "
"flags mutable=True, borrow=False. This combination is " "flags mutable=True, borrow=False. This combination is "
"incompatible since mutable=True implies that the " "incompatible since mutable=True implies that the "
......
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论