Closed corleonechensiyu closed 4 years ago
坐标是整数没问题,这个是什么问题
我也遇到了同样的错误
open(os.path.join(file,name),enconding =“utf-8”)改成这样,加上编码
发自我的iPhone
------------------ 原始邮件 ------------------ 发件人: 周文青 <notifications@github.com> 发送时间: 2020年4月25日 23:39 收件人: WenmuZhou/PSENet.pytorch <PSENet.pytorch@noreply.github.com> 抄送: corleonechensiyu <395934383@qq.com>, Author <author@noreply.github.com> 主题: 回复:[WenmuZhou/PSENet.pytorch] test models eval错误 (#72)
我也遇到了同样的错误
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
解决了吗
Traceback (most recent call last): File "/home/wtc/wgj_biyelunwen/PSENet.pytorch/cal_recall/rrc_evaluation_funcs.py", line 326, in main_evaluation evalData = evaluate_method_fn(p['g'], p['s'], evalParams) File "/home/wtc/wgj_biyelunwen/PSENet.pytorch/cal_recall/script.py", line 135, in evaluate_method gt = rrc_evaluation_funcs.load_folder_file(gtFilePath, evaluationParams['GT_SAMPLE_NAME_2_ID']) File "/home/wtc/wgj_biyelunwen/PSENet.pytorch/cal_recall/rrc_evaluation_funcs.py", line 99, in load_folder_file pairs.append([keyName, open(os.path.join(file,name)).read()]) File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 33: ordinal not in range(128) Traceback (most recent call last): File "train.py", line 263, in
main()
File "train.py", line 217, in main
recall, precision, f1 = eval(model, os.path.join(config.output_dir, 'output'), config.testroot, device)
File "train.py", line 149, in eval
return result_dict['recall'], result_dict['precision'], result_dict['hmean']
TypeError: string indices must be integer