if torch.cuda.device_count() > 1: # 并行 pretrained_model = nn.DataParallel(pretrained_model) 第一句是判断可用的gpu个数