提交 7ab32ffb authored 作者: Frederic's avatar Frederic

pep8

上级 abfbff2c
...@@ -405,7 +405,8 @@ class _tensor_py_operators: ...@@ -405,7 +405,8 @@ class _tensor_py_operators:
return rval return rval
else: else:
return theano.tensor.subtensor.Subtensor(args)( return theano.tensor.subtensor.Subtensor(args)(
self, *theano.tensor.subtensor.Subtensor.collapse(args, self, *theano.tensor.subtensor.Subtensor.collapse(
args,
lambda entry: isinstance(entry, Variable))) lambda entry: isinstance(entry, Variable)))
def take(self, indices, axis=None, mode='raise'): def take(self, indices, axis=None, mode='raise'):
...@@ -701,6 +702,7 @@ class TensorConstant(_tensor_py_operators, Constant): ...@@ -701,6 +702,7 @@ class TensorConstant(_tensor_py_operators, Constant):
other = theano.tensor.basic.constant(other) other = theano.tensor.basic.constant(other)
return (isinstance(other, TensorConstant) and return (isinstance(other, TensorConstant) and
self.signature() == other.signature()) self.signature() == other.signature())
def __copy__(self): def __copy__(self):
# We need to do this to remove the cached attribute # We need to do this to remove the cached attribute
return type(self)(self.type, self.data, self.name) return type(self)(self.type, self.data, self.name)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论