提交 f6e80455 authored 作者: Frederic's avatar Frederic

clean up of the grad

上级 c923ce25
...@@ -589,8 +589,8 @@ class DownsampleFactorMaxGradGrad(Op): ...@@ -589,8 +589,8 @@ class DownsampleFactorMaxGradGrad(Op):
z_shape = self.out_shape(x.shape, self.ds, self.ignore_border, self.st) z_shape = self.out_shape(x.shape, self.ds, self.ignore_border, self.st)
if (z[0] is None) or (z[0].shape != z_shape): if (z[0] is None) or (z[0].shape != z_shape):
z[0] = numpy.zeros(self.out_shape(x.shape, self.ds, z[0] = numpy.zeros(self.out_shape(x.shape, self.ds,
self.ignore_border, self.st)) self.ignore_border, self.st),
z[0] = theano._asarray(z[0], dtype=x.dtype) dtype=x.dtype)
ggz = z[0] ggz = z[0]
#number of pooling output rows #number of pooling output rows
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论