Pytorch多GPU的计算和Sync BatchNorm
nn.DataParallel pytorch中使用GPU非常方便和简单: import torch import torch.nn as nn input_size = 5 output_size = 2 class Model(nn.Module): def __init__(self, input_size, output_size): super(Model, self).__init__() self.fc = nn.Linear(input_size, output_size) def forward(self, input):
用户评论