![](https://img-blog.csdnimg.cn/7f7f8dc619cc40139907bbf0caf9343e.jpg?x-oss-process=image/resize,m_fixed,h_224,w_224)
Pytorch那些事儿
Pytorch那些事儿
Ghy817920
这个作者很懒,什么都没留下…
展开
-
Pytorch——基于DataParallel单机多GPU并行之batch normalization
import torch.nn as nnimport torchimport osimport torch.nn.functional as Fclass Model(nn.Module): def __init__(self,): super(Model, self).__init__() self.l = nn.Linear(2,1,bias=False) self.b = nn.BatchNorm1d(1) s.原创 2020-06-06 10:39:57 · 721 阅读 · 0 评论 -
Pytorch——基于DistributedDataParallel单机多GPU并行之broadcast_buffers
在使用Pytorch进行单机多GPU并行时,往往有两种方式,一种是基于DataParallel,另一种是基于DistributedDataParallel。前者太简单了,且速度不如后者,所以不作过多讨论。咱们在使用DistributedDataParallel时,其中有个参数broadcast_buffers,官方给出的解释就是broadcast_buffers (bool): flag t...原创 2020-03-28 11:16:20 · 5294 阅读 · 2 评论