Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ef86482

Browse files
update utils
1 parent a699e10 commit ef86482

File tree

12 files changed

+1150
-11
lines changed

12 files changed

+1150
-11
lines changed

‎chapter4_CNN/batch-normalization.ipynb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
},
2020
"outputs": [],
2121
"source": [
22+
"import sys\n",
23+
"sys.path.append('..')\n",
24+
"\n",
2225
"import torch"
2326
]
2427
},

‎chapter4_CNN/data-augumentation.ipynb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,9 @@
409409
},
410410
"outputs": [],
411411
"source": [
412+
"import sys\n",
413+
"sys.path.append('..')\n",
414+
"\n",
412415
"import numpy as np\n",
413416
"import torch\n",
414417
"from torch import nn\n",

‎chapter4_CNN/densenet.ipynb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
},
2020
"outputs": [],
2121
"source": [
22+
"import sys\n",
23+
"sys.path.append('..')\n",
24+
"\n",
2225
"import numpy as np\n",
2326
"import torch\n",
2427
"from torch import nn\n",

‎chapter4_CNN/googlenet.ipynb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
},
2020
"outputs": [],
2121
"source": [
22+
"import sys\n",
23+
"sys.path.append('..')\n",
24+
"\n",
2225
"import numpy as np\n",
2326
"import torch\n",
2427
"from torch import nn\n",

‎chapter4_CNN/lr-decay.ipynb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
},
2020
"outputs": [],
2121
"source": [
22+
"import sys\n",
23+
"sys.path.append('..')\n",
24+
"\n",
2225
"import numpy as np\n",
2326
"import torch\n",
2427
"from torch import nn\n",

‎chapter4_CNN/regularization.ipynb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
},
2020
"outputs": [],
2121
"source": [
22+
"import sys\n",
23+
"sys.path.append('..')\n",
24+
"\n",
2225
"import numpy as np\n",
2326
"import torch\n",
2427
"from torch import nn\n",

‎chapter4_CNN/resnet.ipynb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
},
2020
"outputs": [],
2121
"source": [
22+
"import sys\n",
23+
"sys.path.append('..')\n",
24+
"\n",
2225
"import numpy as np\n",
2326
"import torch\n",
2427
"from torch import nn\n",

‎chapter4_CNN/vgg.ipynb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
},
2020
"outputs": [],
2121
"source": [
22+
"import sys\n",
23+
"sys.path.append('..')\n",
24+
"\n",
2225
"import numpy as np\n",
2326
"import torch\n",
2427
"from torch import nn\n",

‎chapter6_PyTorch-Advances/optimizer/momentum.ipynb

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,6 @@
116116
"print('使用时间: {:.5f} s'.format(end - start))"
117117
]
118118
},
119-
{
120-
"cell_type": "markdown",
121-
"metadata": {},
122-
"source": [
123-
"当然,pytorch 内置了动量法的实现,非常简单,直接在 `torch.optim.SGD(momentum=0.9)` 即可,下面实现一下"
124-
]
125-
},
126119
{
127120
"cell_type": "code",
128121
"execution_count": 25,
@@ -145,7 +138,7 @@
145138
],
146139
"source": [
147140
"train_data = DataLoader(train_set, batch_size=64, shuffle=True)\n",
148-
"# 使用 Sequential 定义 3 层神经网络\n",
141+
"# 使用 Sequential 定义 2 层神经网络\n",
149142
"net = nn.Sequential(\n",
150143
" nn.Linear(784, 200),\n",
151144
" nn.ReLU(),\n",

‎chapter6_PyTorch-Advances/tensorboard.ipynb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
},
2121
"outputs": [],
2222
"source": [
23+
"import sys\n",
24+
"sys.path.append('..')\n",
25+
"\n",
2326
"import numpy as np\n",
2427
"import torch\n",
2528
"from torch import nn\n",
@@ -200,9 +203,9 @@
200203
],
201204
"metadata": {
202205
"kernelspec": {
203-
"display_name": "Python 3",
206+
"display_name": "mx",
204207
"language": "python",
205-
"name": "python3"
208+
"name": "mx"
206209
},
207210
"language_info": {
208211
"codemirror_mode": {
@@ -214,7 +217,7 @@
214217
"name": "python",
215218
"nbconvert_exporter": "python",
216219
"pygments_lexer": "ipython3",
217-
"version": "3.6.2"
220+
"version": "3.6.0"
218221
}
219222
},
220223
"nbformat": 4,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /