因为配置问题只能采用单GPU训练,在参考前面的‘单GPU问题’的解决方案后,将slowfast/datasets/utils.py,line 412, in create_sampler中的
sampler = DistributedSampler(dataset) if cfg.NUM_GPUS >= 1 else None
改为
sampler = DistributedSampler(dataset) if cfg.NUM_GPUS >= 1 else RandomSampler(dataset)
后,出现下面问题:
Traceback (most recent call last):
File "tools/run_net_multi_node.py", line 69, in <module>
main()
File "tools/run_net_multi_node.py", line 54, in main
launch_job(cfg=cfg, init_method=args.init_method, func=test)
File "/root/common-dir/UniFormerV2/slowfast/utils/misc.py", line 311, in launch_job
func(cfg=cfg)
File "/root/common-dir/UniFormerV2/tools/test_net.py", line 168, in test
cu.load_test_checkpoint(cfg, model)
File "/root/common-dir/UniFormerV2/slowfast/utils/checkpoint.py", line 500, in load_test_checkpoint
name = sorted(names)[-1]
IndexError: list index out of range
因为配置问题只能采用单GPU训练,在参考前面的‘单GPU问题’的解决方案后,将slowfast/datasets/utils.py,line 412, in create_sampler中的
sampler = DistributedSampler(dataset) if cfg.NUM_GPUS >= 1 else None
改为sampler = DistributedSampler(dataset) if cfg.NUM_GPUS >= 1 else RandomSampler(dataset)
后,出现下面问题:请问这个问题该如何解决?