Skip to content

num_gpu #60

Description

@jihuan1203

我添加了:

    os.environ["CUDA_VISIBLE_DEVICES"] = "1,2"

其中,指定

            "args": [
                "--config-file",
                "configs/FPN_R_50/CTW1500/finetune_96voc_50maxlen.yaml",
                "--num-gpus",
                "2"
            ],

在train_net.py中,并且torch.cuda.device_count() = 2
报错:

  File "/home/wit/anaconda3/envs/lj_py3.8pt1.10/lib/python3.8/site-packages/detectron2/engine/launch.py", line 119, in _distributed_worker
    assert num_gpus_per_machine <= torch.cuda.device_count()
AssertionError 

想知道num_gpus_per_machine 值与什么因素有关

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions