pyinstaller遇到错误OSError: Can‘t get source for <function batched_nms at 0x000002EB9D720B80>.

前言

使用pyinstaller将detectron2打包成exe后,调用detectron2的导出TorchScript模型出现错误。次错误是继上一次错误pyinstaller打包错误:OSError: Can‘t get source for <function sigmoid_focal_loss at 0x00000174BE600F70>.之后出现的第二个错误
环境:
System:Windows10
Pytorch:1.8.1
Detectron2:0.6
CUDA:11.1

错误信息

pyinstaller遇到错误OSError: Can‘t get source for <function batched_nms at 0x000002EB9D720B80>._第1张图片

Traceback (most recent call last):
  File "torch\_utils_internal.py", line 55, in get_source_lines_and_file
  File "inspect.py

你可能感兴趣的:(bug,python,深度学习,人工智能)