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

Fix crashes introduced in this PR.

上级 452b6e2b
...@@ -249,7 +249,7 @@ def local_gpua_incsubtensor(node): ...@@ -249,7 +249,7 @@ def local_gpua_incsubtensor(node):
def local_gpua_careduce(node): def local_gpua_careduce(node):
if (isinstance(node.op.scalar_op, scalar.basic.Add) or if (isinstance(node.op.scalar_op, scalar.basic.Add) or
isinstance(node.op.scalar_op, scalar.basic.Mul)): isinstance(node.op.scalar_op, scalar.basic.Mul)):
x, = node.inputs
greduce = GpuCAReduce(node.op.scalar_op, axis=node.op.axis) greduce = GpuCAReduce(node.op.scalar_op, axis=node.op.axis)
if greduce.supports_c_code([gpu_from_host(x)]): if greduce.supports_c_code([gpu_from_host(x)]):
return greduce return greduce
......
...@@ -1398,7 +1398,7 @@ def _check_rows_is_arange_len_labels(rows, labels): ...@@ -1398,7 +1398,7 @@ def _check_rows_is_arange_len_labels(rows, labels):
shape_subtensor = stop.owner shape_subtensor = stop.owner
if list(shape_subtensor.op.idx_list) == [0]: if list(shape_subtensor.op.idx_list) == [0]:
shape_var, = shape_subtensor.inputs shape_var, = shape_subtensor.inputs
if shape_var.owner and shape_var.owner.op == tensor._shape: if shape_var.owner and shape_var.owner.op == tensor.shape:
return shape_var.owner.inputs[0] is labels return shape_var.owner.inputs[0] is labels
else: else:
shape_of = stop.owner.fgraph.shape_feature.shape_of shape_of = stop.owner.fgraph.shape_feature.shape_of
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论