From 582625152a6084a5ef72e4877b18cd458263f3ed Mon Sep 17 00:00:00 2001 From: SunAhong1993 Date: Thu, 4 Mar 2021 12:39:48 +0800 Subject: [PATCH] fix the Chinese --- x2paddle/optimizer/pytorch_code_optimizer/hierachical_tree.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x2paddle/optimizer/pytorch_code_optimizer/hierachical_tree.py b/x2paddle/optimizer/pytorch_code_optimizer/hierachical_tree.py index 6e7e4af..5ae708b 100644 --- a/x2paddle/optimizer/pytorch_code_optimizer/hierachical_tree.py +++ b/x2paddle/optimizer/pytorch_code_optimizer/hierachical_tree.py @@ -383,9 +383,9 @@ class HierarchicalTree(Tree): input_data_name = ', '.join(self.pd_graph.inputs) run_func_list = list() run_func_list.append("def main({}):".format(input_data_name)) - run_func_list.append(" # 共{}个输入".format(len(self.pd_graph.inputs_info))) + run_func_list.append(" # There are {} inputs.".format(len(self.pd_graph.inputs_info))) for k, v in self.pd_graph.inputs_info.items(): - run_func_list.append(" # {}: 形状为{},类型为{}。".format(k, v[0], v[1])) + run_func_list.append(" # {}: shape-{},type-{}。".format(k, v[0], v[1])) run_func_list.extend( [" paddle.disable_static()", " params = paddle.load('{}/model.pdparams')".format(osp.abspath(save_dir)), -- GitLab