You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2022-02-11 17:43:53,756 - INFO - ===================Initialize Model Done====================
2022-02-11 17:43:56,841 - INFO - Load INFER Dataset Done, Total eval line: 1200
2022-02-11 17:43:56,843 - INFO - Inference Model...
Inference process: 0%| | 0/1200 [00:00<?, ?batch/s]
Traceback (most recent call last):
File "infer.py", line 150, in
main(parsed_args)
File "infer.py", line 122, in main
inference_speed=args.inference_speed, dump_info_file=args.dump_info_file)
File "infer.py", line 59, in infer_model
inference=True, inference_speed=inference_speed)
File "/home/anaconda3/envs/lcOCR1.4/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/users_2/d00477216/fastbert/model_define/model_fastbert.py", line 477, in forward
labels=labels, training_stage=training_stage)
File "/home/anaconda3/envs/lcOCR1.4/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/users_2/d00477216/fastbert/model_define/model_fastbert.py", line 393, in forward
uncertain_infos[certain_positions] = uncertain[enough_info]
RuntimeError: shape mismatch: value tensor of shape [0] cannot be broadcast to indexing result of shape [0, 2]
The text was updated successfully, but these errors were encountered:
大佬,我跑你的infer.py文件,出现以下问题,请问是什么原因导致的?
2022-02-11 17:43:53,756 - INFO - ===================Initialize Model Done====================
2022-02-11 17:43:56,841 - INFO - Load INFER Dataset Done, Total eval line: 1200
2022-02-11 17:43:56,843 - INFO - Inference Model...
Inference process: 0%| | 0/1200 [00:00<?, ?batch/s]
Traceback (most recent call last):
File "infer.py", line 150, in
main(parsed_args)
File "infer.py", line 122, in main
inference_speed=args.inference_speed, dump_info_file=args.dump_info_file)
File "infer.py", line 59, in infer_model
inference=True, inference_speed=inference_speed)
File "/home/anaconda3/envs/lcOCR1.4/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/users_2/d00477216/fastbert/model_define/model_fastbert.py", line 477, in forward
labels=labels, training_stage=training_stage)
File "/home/anaconda3/envs/lcOCR1.4/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/users_2/d00477216/fastbert/model_define/model_fastbert.py", line 393, in forward
uncertain_infos[certain_positions] = uncertain[enough_info]
RuntimeError: shape mismatch: value tensor of shape [0] cannot be broadcast to indexing result of shape [0, 2]
The text was updated successfully, but these errors were encountered: