AttributeError: ‘list‘ object has no attribute ‘seek‘.
记录一个极度恶心人的bug当执行pythonpython detect.py --weights 1.ptTraceback (most recent call last):File "G:\Anaconda\envs\py36\lib\site-packages\torch\serialization.py", line 308, in _check_seekablef.seek(f.tell(
·
记录一个极度恶心人的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
更多推荐



所有评论(0)