提交 7145695f authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Add a comment explaining the dummy param.

上级 028aaef8
...@@ -807,6 +807,8 @@ class AveragePoolGrad(PoolGrad): ...@@ -807,6 +807,8 @@ class AveragePoolGrad(PoolGrad):
assert mode in ['sum', 'average_inc_pad', 'average_exc_pad'] assert mode in ['sum', 'average_inc_pad', 'average_exc_pad']
PoolGrad.__init__(self, ds, ignore_border, st, padding, mode) PoolGrad.__init__(self, ds, ignore_border, st, padding, mode)
# There is an extra dummy parameter to match the parameter count
# of MaxPoolGrad. This is for backward compatibility.
def make_node(self, x, gz, dummy=None): def make_node(self, x, gz, dummy=None):
# make_node should only be called by the grad function of # make_node should only be called by the grad function of
# Pool, so these asserts should not fail. # Pool, so these asserts should not fail.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论