From 4a913c7c5b86d9b16ed4dca0b156b0d02094b817 Mon Sep 17 00:00:00 2001 From: SunAhong1993 Date: Thu, 4 Mar 2021 12:43:43 +0800 Subject: [PATCH] fix the Chinese --- x2paddle/optimizer/pytorch_code_optimizer/module_graph.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x2paddle/optimizer/pytorch_code_optimizer/module_graph.py b/x2paddle/optimizer/pytorch_code_optimizer/module_graph.py index 54e2cbd..b6fb8f7 100644 --- a/x2paddle/optimizer/pytorch_code_optimizer/module_graph.py +++ b/x2paddle/optimizer/pytorch_code_optimizer/module_graph.py @@ -349,9 +349,9 @@ class ModuleGraph(object): 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