提交 e7be3bd9 编写于 作者: Z Zhen Wang

add compat for string.

上级 f96a344b
......@@ -21,6 +21,7 @@ import os
import numpy as np
import six
import paddle.fluid as fluid
import paddle.compat as cpt
from paddle.fluid import core
from paddle.fluid.framework import Program
......@@ -79,7 +80,7 @@ def save_persistable_nodes(executor, dirname, graph):
persistable_nodes = []
all_persistable_nodes = graph.all_persistable_nodes()
for node in all_persistable_nodes:
name = node.name()
name = cpt.to_text(node.name())
if name not in persistable_node_names:
persistable_node_names.add(name)
persistable_nodes.append(node)
......@@ -114,7 +115,7 @@ def load_persistable_nodes(executor, dirname, graph):
persistable_nodes = []
all_persistable_nodes = graph.all_persistable_nodes()
for node in all_persistable_nodes:
name = node.name()
name = cpt.to_text(node.name())
if name not in persistable_node_names:
persistable_node_names.add(name)
persistable_nodes.append(node)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册