提交 e28a57c3 authored 作者: Iban Harlouchet's avatar Iban Harlouchet

__props__ to theano/tensor/nnet/conv3d2d.py

上级 9188880f
......@@ -73,6 +73,8 @@ class DiagonalSubtensor(Op):
see what's necessary at that point.
"""
__props__ = ()
def __str__(self):
if self.inplace:
return "%s{inplace}" % self.__class__.__name__
......@@ -83,12 +85,6 @@ class DiagonalSubtensor(Op):
if inplace:
self.view_map = {0: [0]}
def __eq__(self, other):
return type(self) == type(other) and self.inplace == other.inplace
def __hash__(self):
return hash((type(self), self.inplace))
def make_node(self, x, i0, i1):
_i0 = tensor.as_tensor_variable(i0)
_i1 = tensor.as_tensor_variable(i1)
......@@ -117,6 +113,8 @@ class IncDiagonalSubtensor(Op):
"""
The gradient of DiagonalSubtensor
"""
__props__ = ()
def __str__(self):
if self.inplace:
return "%s{inplace}" % self.__class__.__name__
......@@ -127,12 +125,6 @@ class IncDiagonalSubtensor(Op):
if inplace:
self.destroy_map = {0: [0]}
def __eq__(self, other):
return type(self) == type(other) and self.inplace == other.inplace
def __hash__(self):
return hash((type(self), self.inplace))
def make_node(self, x, i0, i1, amt):
_i0 = tensor.as_tensor_variable(i0)
_i1 = tensor.as_tensor_variable(i1)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论