提交 4d7870db authored 作者: Olivier Breuleux's avatar Olivier Breuleux

fixed the fix

上级 ff7cf542
...@@ -690,6 +690,7 @@ class CAReduce(Op): ...@@ -690,6 +690,7 @@ class CAReduce(Op):
return input_dtype return input_dtype
def make_node(self, input): def make_node(self, input):
if self.axis is not None:
for axis in self.axis: for axis in self.axis:
if axis >= input.type.ndim: if axis >= input.type.ndim:
raise TypeError('Not enough dimensions on %s to reduce on axis %s' % (input, axis)) raise TypeError('Not enough dimensions on %s to reduce on axis %s' % (input, axis))
......
...@@ -497,7 +497,8 @@ class Canonizer(gof.LocalOptimizer): ...@@ -497,7 +497,8 @@ class Canonizer(gof.LocalOptimizer):
parent = input.owner parent = input.owner
# We get the (num, denum) pairs for each input # We get the (num, denum) pairs for each input
pairs = [self.get_num_denum(input2) if input2.type.dtype == input.type.dtype else ([input2], []) for input2 in parent.inputs] #pairs = [self.get_num_denum(input2) if input2.type.dtype == input.type.dtype else ([input2], []) for input2 in parent.inputs]
pairs = [self.get_num_denum(input2) for input2 in parent.inputs]
if parent.op == self.main: if parent.op == self.main:
# If we have main(x, y), numx, denumx, numy and denumy # If we have main(x, y), numx, denumx, numy and denumy
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论