Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

多GPU训练Yolov3 #16

Closed
saigequn opened this issue Jan 18, 2019 · 4 comments
Closed

多GPU训练Yolov3 #16

saigequn opened this issue Jan 18, 2019 · 4 comments

Comments

@saigequn
Copy link

两个GPU训练Yolov3

yolov3.yml修改

gpus: "0,1"
mini_batch_size:8

GPU使用情况如下

Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Tesla P100-PCIE...  Off  | 00000000:05:00.0 Off |                    0 |
| N/A   58C    P0   237W / 250W |   8835MiB / 16160MiB |     100%      Default|
+-------------------------------+----------------------+----------------------+
|   1  Tesla P100-PCIE...  Off  | 00000000:89:00.0 Off |                    0 |
| N/A   36C    P0    25W / 250W |     11MiB / 16160MiB |      0%      Default 

其中一个GPU在闲置

@mileistone
Copy link
Contributor

We don't support multi gpus now. It's easy, you can implement it in 10 minutes.

@tonysy
Copy link

tonysy commented Mar 17, 2019

Could you share how to revise the code to achieve multi-gpu train? I found it difficult to implement.

@yutaizhou
Copy link

Can you share a guide on multi gpu implementation? Or give some good resources?

@gongh4
Copy link

gongh4 commented Jul 23, 2020

First, update the cfg set gpus:"0,1"
Then, in _voc_train.py, insert the code after
if self.cuda:
net.cuda()
as
net.net = torch.nn.DataParallel(net.net)

Then, you can train using multi-gpu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants