Skip to content

Commit b13697f

Browse files
authored
添加在非 jupyter notebook 环境下代码需要引入的包的代码。
虽然对于老鸟这不是个事,但是对于看文档学习的初学者来说,确实是件困惑的事。
1 parent d2e0009 commit b13697f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

chapter4/4.5-multiply-gpu-parallel-training.ipynb

+2
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,8 @@
499499
"outputs": [],
500500
"source": [
501501
"# 以下脚本在jupyter notebook执行肯定会不成功,请保存成py文件后测试\n",
502+
"import torch\n",
503+
"import argparse\n",
502504
"from torch.utils.data.distributed import DistributedSampler\n",
503505
"from torch.utils.data import DataLoader\n",
504506
"\n",

0 commit comments

Comments
 (0)