把1.3.5中的In[6]代码段对齐
This commit is contained in:
parent
c900b052c0
commit
860c8ad18f
@ -206,9 +206,9 @@
|
|||||||
"source": [
|
"source": [
|
||||||
"model = Model(input_size, output_size)\n",
|
"model = Model(input_size, output_size)\n",
|
||||||
"if torch.cuda.device_count() > 1:\n",
|
"if torch.cuda.device_count() > 1:\n",
|
||||||
" print(\"Let's use\", torch.cuda.device_count(), \"GPUs!\")\n",
|
" print(\"Let's use\", torch.cuda.device_count(), \"GPUs!\")\n",
|
||||||
" # dim = 0 [30, xxx] -> [10, ...], [10, ...], [10, ...] on 3 GPUs\n",
|
" # dim = 0 [30, xxx] -> [10, ...], [10, ...], [10, ...] on 3 GPUs\n",
|
||||||
" model = nn.DataParallel(model)\n",
|
" model = nn.DataParallel(model)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"model.to(device)"
|
"model.to(device)"
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user