-
Notifications
You must be signed in to change notification settings - Fork 155
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
多机多卡分布式训练如何实现? #62
Comments
您好,我之前写过一个单机多卡的DDP的示例,多机多卡我这边还没测试过,欢迎指教和补充~ |
在训练时,每个epoch需要设置sampler的随机种子,model.fit()里好像并没有考虑到。官方的torch.utils.data.DistributedSampler使用代码如下: sampler = DistributedSampler(dataset) if is_distributed else None |
好的,谢谢指导~,目前要实现的话,方式的确有点别扭,是需要在一个 |
@zhouyiyuan-mt 我在torch4keras中这里,也是就dataloader消耗完的时候重新设置(即steps_per_epoch=None时,一个epoch结束时候即为dataloader消耗完) |
@Tongjilibo 您好,我看model里面有BaseModelDDP,想知道是如何使用来进行分布式训练呢,里面只有一个master_rank参数,多机多卡的进程数、地址那些在哪设置呢
The text was updated successfully, but these errors were encountered: