提交 17666684 authored 作者: Faruk Ahmed's avatar Faruk Ahmed

ommitted to change numpy to np in opt

上级 1b07a532
from __future__ import absolute_import, print_function, division
"""
Tensor optimizations addressing the ops in basic.py.
""" Tensor optimizations addressing the ops in basic.py.
"""
# TODO: intelligent merge for mul/add
# TODO: 0*x -> 0
......@@ -3421,7 +3420,7 @@ def incsubtensor_of_zeros_to_setsubtensor(node):
if (isinstance(node.op, (IncSubtensor)) and not node.op.set_instead_of_inc):
x = node.inputs[0]
if isinstance(x, T.Constant) and not numpy.any(x.data):
if isinstance(x, T.Constant) and not np.any(x.data):
return [IncSubtensor(node.op.idx_list,
node.op.inplace,
set_instead_of_inc=True,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论