提交 ad600146 authored 作者: Olivier Delalleau's avatar Olivier Delalleau

zip -> izip

上级 a7e0cf4e
...@@ -317,7 +317,7 @@ def ifelse(condition, then_branch, else_branch, name=None): ...@@ -317,7 +317,7 @@ def ifelse(condition, then_branch, else_branch, name=None):
# we will store them in these new_... lists. # we will store them in these new_... lists.
new_then_branch = [] new_then_branch = []
new_else_branch = [] new_else_branch = []
for then_branch_elem, else_branch_elem in zip(then_branch, else_branch): for then_branch_elem, else_branch_elem in izip(then_branch, else_branch):
if not isinstance(then_branch_elem, theano.Variable): if not isinstance(then_branch_elem, theano.Variable):
then_branch_elem = theano.tensor.as_tensor_variable(then_branch_elem) then_branch_elem = theano.tensor.as_tensor_variable(then_branch_elem)
if not isinstance(else_branch_elem, theano.Variable): if not isinstance(else_branch_elem, theano.Variable):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论