未验证 提交 3448455b 编写于 作者: X xujiaqi01 提交者: GitHub

fix dataset py3 (#25012)

* fix dataset py3 error
* test=develop
上级 6e86fd37
...@@ -49,6 +49,8 @@ class TrainerDesc(object): ...@@ -49,6 +49,8 @@ class TrainerDesc(object):
self._infer = False self._infer = False
def _set_fetch_var_and_info(self, fetch_vars, fetch_info, print_period): def _set_fetch_var_and_info(self, fetch_vars, fetch_info, print_period):
# convert fetch_info to list
fetch_info = list(fetch_info)
for i, v in enumerate(fetch_vars): for i, v in enumerate(fetch_vars):
self.proto_desc.fetch_config.fetch_var_names.extend([v.name]) self.proto_desc.fetch_config.fetch_var_names.extend([v.name])
self.proto_desc.fetch_config.fetch_var_str_format.extend( self.proto_desc.fetch_config.fetch_var_str_format.extend(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册