提交 5dbcb081 authored 作者: David Warde-Farley's avatar David Warde-Farley

PEP8 DoubleOp in the documentation.

上级 ed8c69c9
...@@ -108,13 +108,17 @@ Op example ...@@ -108,13 +108,17 @@ Op example
class DoubleOp(theano.Op): class DoubleOp(theano.Op):
def __eq__(self, other): def __eq__(self, other):
return type(self) == type(other) return type(self) == type(other)
def __hash__(self): def __hash__(self):
return hash(type(self)) return hash(type(self))
def __str__(self): def __str__(self):
return self.__class__.__name__ return self.__class__.__name__
def make_node(self, x): def make_node(self, x):
x = theano.tensor.as_tensor_variable(x) x = theano.tensor.as_tensor_variable(x)
return theano.Apply(self, [x], [x.type()]) return theano.Apply(self, [x], [x.type()])
def perform(self, node, inputs, output_storage): def perform(self, node, inputs, output_storage):
x = inputs[0] x = inputs[0]
z = output_storage[0] z = output_storage[0]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论