提交 b1763546 authored 作者: Frederic Bastien's avatar Frederic Bastien

remove duplicate import.

上级 19d28797
...@@ -10,7 +10,6 @@ from elemwise import Elemwise, DimShuffle ...@@ -10,7 +10,6 @@ from elemwise import Elemwise, DimShuffle
from theano import scalar from theano import scalar
import basic as T import basic as T
import inplace as I import inplace as I
import numpy
import numpy as N import numpy as N
import operator import operator
import itertools import itertools
...@@ -873,9 +872,9 @@ def local_mul_zero(node): ...@@ -873,9 +872,9 @@ def local_mul_zero(node):
except TypeError: except TypeError:
continue continue
#print 'MUL by value', value, node.inputs #print 'MUL by value', value, node.inputs
if numpy.all(value == 0): if N.all(value == 0):
#print '... returning zeros' #print '... returning zeros'
return _fill_chain(numpy.asarray(0, dtype=otype.dtype), node.inputs) return _fill_chain(N.asarray(0, dtype=otype.dtype), node.inputs)
register_canonicalize(local_mul_zero) register_canonicalize(local_mul_zero)
@gof.local_optimizer([T.true_div]) @gof.local_optimizer([T.true_div])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论