提交 12768c0e authored 作者: Ian Goodfellow's avatar Ian Goodfellow

changed a zip to an izip

上级 d4cfdecf
...@@ -17,6 +17,7 @@ np = numpy ...@@ -17,6 +17,7 @@ np = numpy
import theano import theano
from itertools import izip
from theano import gof from theano import gof
from theano.gof import Variable from theano.gof import Variable
from theano.gof.python25 import all from theano.gof.python25 import all
...@@ -335,7 +336,7 @@ def Lop(f, wrt, eval_points, consider_constant=None, ...@@ -335,7 +336,7 @@ def Lop(f, wrt, eval_points, consider_constant=None,
wrt = [wrt] wrt = [wrt]
assert len(f) == len(grads) assert len(f) == len(grads)
known = dict(zip(f, grads)) known = dict(izip(f, grads))
ret = grad(cost=None, known_grads=known, ret = grad(cost=None, known_grads=known,
consider_constant=consider_constant, wrt=wrt, consider_constant=consider_constant, wrt=wrt,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论