提交 e06a4c68 authored 作者: ChienliMa's avatar ChienliMa

add type conversion for map to fit higher version python.

上级 5ce66fee
...@@ -604,7 +604,7 @@ class Function(object): ...@@ -604,7 +604,7 @@ class Function(object):
# Re initialize Outs and swap update and variable in Ins # Re initialize Outs and swap update and variable in Ins
# By doing this, we can pass FunctionMaker._check_unused_inputs() # By doing this, we can pass FunctionMaker._check_unused_inputs()
outs = map(SymbolicOutput, fg_cpy.outputs[:len(maker.outputs)]) outs = list(map(SymbolicOutput, fg_cpy.outputs[:len(maker.outputs)]))
update_i = len(outs) update_i = len(outs)
for i, in_var in zip(ins, fg_cpy.inputs): for i, in_var in zip(ins, fg_cpy.inputs):
...@@ -1386,7 +1386,7 @@ class FunctionMaker(object): ...@@ -1386,7 +1386,7 @@ class FunctionMaker(object):
# fgraph is already an optimized one # fgraph is already an optimized one
need_opt = False need_opt = False
updates = [spec.update for spec in inputs if spec.update] updates = [spec.update for spec in inputs if spec.update]
additional_outputs = map(SymbolicOutput, updates) additional_outputs = list(map(SymbolicOutput, updates))
self.fgraph = fgraph self.fgraph = fgraph
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论