JDAI-CV / fast-reid

SOTA Re-identification Methods and Toolbox
Apache License 2.0
3.39k stars 830 forks source link

Mac上复现时报错。 #684

Closed Shephermand closed 1 year ago

Shephermand commented 1 year ago

mac在conda环境中复现fastreid: 安装依赖包时,faiss-gpu无法安装报错,但faiss-cpu可以安装 之后运行train_net.py时报错 运行命令: python3 tools/train_net.py --config-file ./configs/Market1501/bagtricks_R50.yml MODEL.DEVICE "cuda:0" 报错: Traceback (most recent call last): File "tools/train_net.py", line 57, in args=(args,), File "./fastreid/engine/launch.py", line 71, in launch main_func(*args) File "tools/train_net.py", line 42, in main trainer = DefaultTrainer(cfg) File "./fastreid/engine/defaults.py", line 201, in init data_loader = self.build_train_loader(cfg) File "./fastreid/engine/defaults.py", line 406, in build_train_loader return build_reid_train_loader(cfg, combineall=cfg.DATASETS.COMBINEALL) File "./fastreid/config/config.py", line 265, in wrapped return orig_func(**explicit_args) File "./fastreid/data/build.py", line 95, in build_reid_train_loader pin_memory=True, File "./fastreid/data/data_utils.py", line 152, in init local_rank File "/Users/shepherd/opt/anaconda3/envs/fastreid/lib/python3.7/site-packages/torch/cuda/streams.py", line 28, in new with torch.cuda.device(device): File "/Users/shepherd/opt/anaconda3/envs/fastreid/lib/python3.7/site-packages/torch/cuda/init.py", line 243, in enter self.prev_idx = torch._C._cuda_getDevice() AttributeError: module 'torch._C' has no attribute '_cuda_getDevice'

之后又搜到了cpu训练命令,还是报错 运行命令: python3 tools/train_net.py --config-file ./configs/Market1501/bagtricks_R50.yml MODEL.DEVICE "cpu" 报错: Traceback (most recent call last): File "tools/train_net.py", line 57, in args=(args,), File "./fastreid/engine/launch.py", line 71, in launch main_func(*args) File "tools/train_net.py", line 42, in main trainer = DefaultTrainer(cfg) File "./fastreid/engine/defaults.py", line 201, in init data_loader = self.build_train_loader(cfg) File "./fastreid/engine/defaults.py", line 406, in build_train_loader return build_reid_train_loader(cfg, combineall=cfg.DATASETS.COMBINEALL) File "./fastreid/config/config.py", line 265, in wrapped return orig_func(**explicit_args) File "./fastreid/data/build.py", line 95, in build_reid_train_loader pin_memory=True, File "./fastreid/data/data_utils.py", line 152, in init local_rank File "/Users/shepherd/opt/anaconda3/envs/fastreid/lib/python3.7/site-packages/torch/cuda/streams.py", line 28, in new with torch.cuda.device(device): File "/Users/shepherd/opt/anaconda3/envs/fastreid/lib/python3.7/site-packages/torch/cuda/init.py", line 243, in enter self.prev_idx = torch._C._cuda_getDevice() AttributeError: module 'torch._C' has no attribute '_cuda_getDevice'

Mac是集成显卡的版本,可以解决此问题吗?谢谢🙏!

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.