记录一个极度恶心人的bug

当执行python
python detect.py --weights 1.pt

Traceback (most recent call last):
  File "G:\Anaconda\envs\py36\lib\site-packages\torch\serialization.py", line 308, in _check_seekable
    f.seek(f.tell())
AttributeError: 'list' object has no attribute 'seek'
At
tributeError: 'list' object has no attribute 'seek'. You can only torch.load from a file that is seekable. Please pre-load the data into a buffer like io.BytesIO and try to load from it instead.

导致这个bug原因就是后面的带参。
把参数直接写在文件里面就可以了
python detect.py

Logo

CSDN联合极客时间,共同打造面向开发者的精品内容学习社区,助力成长!

更多推荐