把1.3.5中的In[6]代码段对齐

This commit is contained in:
古代中二龙 2019-11-04 09:21:44 +08:00 committed by GitHub
parent c900b052c0
commit 860c8ad18f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -206,9 +206,9 @@
"source": [
"model = Model(input_size, output_size)\n",
"if torch.cuda.device_count() > 1:\n",
" print(\"Let's use\", torch.cuda.device_count(), \"GPUs!\")\n",
" # dim = 0 [30, xxx] -> [10, ...], [10, ...], [10, ...] on 3 GPUs\n",
" model = nn.DataParallel(model)\n",
" print(\"Let's use\", torch.cuda.device_count(), \"GPUs!\")\n",
" # dim = 0 [30, xxx] -> [10, ...], [10, ...], [10, ...] on 3 GPUs\n",
" model = nn.DataParallel(model)\n",
"\n",
"model.to(device)"
]