OpenGVLab / UniFormerV2

[ICCV2023] UniFormerV2: Spatiotemporal Learning by Arming Image ViTs with Video UniFormer
https://arxiv.org/abs/2211.09552
Apache License 2.0
291 stars 18 forks source link

请问一下下载pth文件的问题 #62

Closed Aaron198513 closed 7 months ago

Aaron198513 commented 7 months ago

这是是要我自己在visTransformer下载一个权重文件,然后放到这个路径嘛? Traceback (most recent call last): File "/home/pc/c_zk/UniFormerV2-main/tools/run_net_multi_node.py", line 69, in main() File "/home/pc/c_zk/UniFormerV2-main/tools/run_net_multi_node.py", line 50, in main launch_job(cfg=cfg, init_method=args.init_method, func=train) File "/home/pc/c_zk/UniFormerV2-main/slowfast/utils/misc.py", line 311, in launch_job func(cfg=cfg) File "/home/pc/c_zk/UniFormerV2-main/tools/train_net.py", line 418, in train model = build_model(cfg) File "/home/pc/c_zk/UniFormerV2-main/slowfast/models/build.py", line 42, in build_model model = MODEL_REGISTRY.get(name)(cfg) File "/home/pc/c_zk/UniFormerV2-main/slowfast/models/uniformerv2.py", line 45, in init self.backbone = model.dict[backbone]( File "/home/pc/c_zk/UniFormerV2-main/slowfast/models/uniformerv2_model.py", line 399, in uniformerv2_b16 state_dict = torch.load(_MODELS["ViT-B/16"], map_location='cpu') File "/home/pc/anaconda3/envs/uniformer/lib/python3.9/site-packages/torch/serialization.py", line 699, in load with _open_file_like(f, 'rb') as opened_file: File "/home/pc/anaconda3/envs/uniformer/lib/python3.9/site-packages/torch/serialization.py", line 231, in _open_file_like return _open_file(name_or_buffer, mode) File "/home/pc/anaconda3/envs/uniformer/lib/python3.9/site-packages/torch/serialization.py", line 212, in init super(_open_file, self).init(open(name, mode)) FileNotFoundError: [Errno 2] No such file or directory: '/mnt/lustre/share_data/likunchang/model/vit_b16.pth'

Aaron198513 commented 7 months ago

还是说我要去运行哪个extract.ipnb文件啊

Andy1621 commented 7 months ago

运行extract.ipynb得到vit_b16.pth并设置路径

Aaron198513 commented 7 months ago

谢谢