no_refine_path未定义
原因,作者的代码可能不小心写错了还没有更正,将159行的代码修改如下:
no_refine_path = []
for path in model_path:
if path.split('/')[-1][0] == 'n':
报错AttributeError: ‘list’ object has no attribute ‘seek’
INFO: Testing on 543488 frames
Traceback (most recent call last):
File "F:\ProgramFiles\anconda3\envs\Pose3D\lib\site-packages\torch\serialization.py", line 308, in _check_seekable
f.seek(f.tell())
AttributeError: 'list' object has no attribute 'seek'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 173, in <module>
pre_dict = torch.load(no_refine_path)
File "F:\ProgramFiles\anconda3\envs\Pose3D\lib\site-packages\torch\serialization.py", line 581, in load
with _open_file_like(f, 'rb') as opened_file:
File "F:\ProgramFiles\anconda3\envs\Pose3D\lib\site-packages\torch\serialization.py", line 235, in _open_file_like
return _open_buffer_reader(name_or_buffer)
File "F:\ProgramFiles\anconda3\envs\Pose3D\lib\site-packages\torch\serialization.py", line 220, in __init__
_check_seekable(buffer)
File "F:\ProgramFiles\anconda3\envs\Pose3D\lib\site-packages\torch\serialization.py", line 311, in _check_seekable
raise_err_msg(["seek", "tell"], e)
File "F:\ProgramFiles\anconda3\envs\Pose3D\lib\site-packages\torch\serialization.py", line 304, in raise_err_msg
raise type(e)(msg)
AttributeError: '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.
刚开始以为是路径或者参数问题,经过多次检查后没有问题,最后判断应该是gpu不行,转到算力平台上重新测试,结果成功。
最后推荐一个国内的算力平台,九天毕昇,虽然和colab有差距,但是也算很好用了,强烈推荐。附一个我的邀请码,可以为双方增加算力豆
分享给你一个宝藏 AI 学习和实战平台“九天·毕昇”,注册即可免费赢取 2000 个算力豆(100 小时 V100 使用时长),还可助我赢取 1000 个算力豆哦~ https://jtedu.cmri.cn/web#/register?token=ODczNGNhNzEtM2JmOC00NTk3LWE3YzktMWViMWJlZjBhZDFk