提交 33009ac8 authored 作者: James Bergstra's avatar James Bergstra

relaxed type restrictions in DownsampleMax.make_node

上级 dc00b2b6
......@@ -175,10 +175,10 @@ class DownsampleFactorMax(Op):
return '%s{%s,%s}' % (self.__class__.__name__, self.ds, self.ignore_border)
def make_node(self, x):
dmatrix4 = tensor.TensorType(x.type.dtype, (False, False, False, False))
if x.type != dmatrix4:
raise NotImplementedError()
return gof.Apply(self, [x], [dmatrix4()])
if x.type.ndim != 4:
raise TypeError()
# TODO: consider restrucing the dtype?
return gof.Apply(self, [x], [x.type()])
def perform(self, node, (x,), (z,)):
"""
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论