HongguLiu / Deepfake-Detection

The Pytorch implemention of Deepfake Detection based on Faceforensics++
https://github.com/ondyari/FaceForensics
Apache License 2.0
293 stars 57 forks source link

multiple-gpu case #2

Open zhuolinumd opened 4 years ago

zhuolinumd commented 4 years ago

@HongguLiu have you tested your training code with multiple gpu? I got the RuntimeError: NCCL Error 2: unhandled system error. One gpu case is fine for me. Thanks.

HongguLiu commented 4 years ago

To train a model with multiple gpus, we use model = nn.DataParallel(model) . If you have trained a model with multiple gpus, you must test model with if isinstance(model, torch.nn.DataParallel): model = model.module

zhuolinumd commented 4 years ago

@HongguLiu Thanks for letting me know the testing case. I was talking about the training. I got the NCCL error. Have you successfully finished the training with multiple gpu? if so, could you update your python requirements file https://github.com/HongguLiu/Deepfake-Detection/blob/master/requirements.txt to include more details about the python environment ? it could be pytorch issue.

HongguLiu commented 4 years ago

We usually train our model with multiple gpu. And this code is support of training with multiple gpu.