将模型路径和config文件路径配置好了之后,执行python test.py,提示如下:
Traceback (most recent call last):
File "test.py", line 117, in
main(args)
File "test.py", line 107, in main
test(test_loader, model, cfg)
File "test.py", line 56, in test
outputs = model(*data)
File "/home/ethony/anaconda3/envs/ocr/lib/python3.6/site-packages/torch/nn/modules/module.py", line 547, in call
result = self.forward(input, **kwargs)
File "/media/ethony/C14D581BDA18EBFA/lyg_datas_and_code/OCR_work/pan_pp.pytorch-master/models/pan.py", line 104, in forward
det_res = self.det_head.get_results(det_out, img_metas, cfg)
File "/media/ethony/C14D581BDA18EBFA/lyg_datas_and_code/OCR_work/pan_pp.pytorch-master/models/head/pa_head.py", line 65, in get_results
label = pa(kernels, emb)
TypeError: 'module' object is not callable
看提示应该是model/post_processing下的pa没有正确导入,导入为模块了,这应该怎么解决呢
将模型路径和config文件路径配置好了之后,执行python test.py,提示如下: Traceback (most recent call last): File "test.py", line 117, in
main(args)
File "test.py", line 107, in main
test(test_loader, model, cfg)
File "test.py", line 56, in test
outputs = model(*data)
File "/home/ethony/anaconda3/envs/ocr/lib/python3.6/site-packages/torch/nn/modules/module.py", line 547, in call
result = self.forward(input, **kwargs)
File "/media/ethony/C14D581BDA18EBFA/lyg_datas_and_code/OCR_work/pan_pp.pytorch-master/models/pan.py", line 104, in forward
det_res = self.det_head.get_results(det_out, img_metas, cfg)
File "/media/ethony/C14D581BDA18EBFA/lyg_datas_and_code/OCR_work/pan_pp.pytorch-master/models/head/pa_head.py", line 65, in get_results
label = pa(kernels, emb)
TypeError: 'module' object is not callable
看提示应该是model/post_processing下的pa没有正确导入,导入为模块了,这应该怎么解决呢