提交 8df6d348 authored 作者: Frederic's avatar Frederic

remove special case __str__. There is too many parameter and the user do not know the order.

上级 5fa1bde4
...@@ -237,11 +237,6 @@ class DownsampleFactorMax(Op): ...@@ -237,11 +237,6 @@ class DownsampleFactorMax(Op):
" 'average_inc_pad' and 'average_exc_pad'. Got %s" % mode) " 'average_inc_pad' and 'average_exc_pad'. Got %s" % mode)
self.mode = mode self.mode = mode
def __str__(self):
return '%s{%s, %s, %s, %s, %s}' % (
self.__class__.__name__,
self.ds, self.st, self.ignore_border, self.padding, self.mode)
def make_node(self, x): def make_node(self, x):
if x.type.ndim != 4: if x.type.ndim != 4:
raise TypeError() raise TypeError()
...@@ -488,11 +483,6 @@ class DownsampleFactorMaxGrad(Op): ...@@ -488,11 +483,6 @@ class DownsampleFactorMaxGrad(Op):
" 'average_inc_pad' and 'average_exc_pad'. Got %s" % mode) " 'average_inc_pad' and 'average_exc_pad'. Got %s" % mode)
self.mode = mode self.mode = mode
def __str__(self):
return '%s{%s, %s, %s, %s, %s}' % (
self.__class__.__name__,
self.ds, self.st, self.ignore_border, self.padding, self.mode)
def make_node(self, x, maxout, gz): def make_node(self, x, maxout, gz):
# make_node should only be called by the grad function of # make_node should only be called by the grad function of
# DownsampleFactorMax, so these asserts should not fail. # DownsampleFactorMax, so these asserts should not fail.
...@@ -765,10 +755,6 @@ class DownsampleFactorMaxGradGrad(Op): ...@@ -765,10 +755,6 @@ class DownsampleFactorMaxGradGrad(Op):
st = ds st = ds
self.st = tuple(st) self.st = tuple(st)
def __str__(self):
return '%s{%s,%s,%s}' % (self.__class__.__name__,
self.ds, self.st, self.ignore_border)
def make_node(self, x, maxout, gz): def make_node(self, x, maxout, gz):
# make_node should only be called by the grad function of # make_node should only be called by the grad function of
# DownsampleFactorMaxGrad, so these asserts should not fail. # DownsampleFactorMaxGrad, so these asserts should not fail.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论