From 3feb64766f1ea13074db3976d729de69f79a7e1c Mon Sep 17 00:00:00 2001 From: Xing Wu Date: Mon, 16 Mar 2020 12:07:40 +0800 Subject: [PATCH] add .encode('utf-8') to fix predict outputs (#4423) --- dygraph/lac/predict.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dygraph/lac/predict.py b/dygraph/lac/predict.py index 6431f76b..264e56f9 100755 --- a/dygraph/lac/predict.py +++ b/dygraph/lac/predict.py @@ -80,7 +80,7 @@ def do_infer(args): result = infer_process(infer_loader) for sent, tags in result: result_list = ['(%s, %s)' % (ch, tag) for ch, tag in zip(sent, tags)] - print(''.join(result_list)) + print(''.join(result_list).encode('utf-8')) if __name__ == '__main__': args = parser.parse_args() -- GitLab