Browse Source

Update some contents

master
bushuhui 2 years ago
parent
commit
4fa8de23d9
7 changed files with 26 additions and 12 deletions
  1. +9
    -0
      7_deep_learning/1_CNN/01-basic_conv.ipynb
  2. +2
    -2
      7_deep_learning/1_CNN/04-vgg.ipynb
  3. +11
    -6
      7_deep_learning/1_CNN/05-googlenet.ipynb
  4. +1
    -1
      7_deep_learning/1_CNN/06-resnet.ipynb
  5. +1
    -1
      7_deep_learning/1_CNN/07-densenet.ipynb
  6. +1
    -1
      7_deep_learning/2_RNN/pytorch-rnn.ipynb
  7. +1
    -1
      7_deep_learning/2_RNN/rnn-for-image.ipynb

+ 9
- 0
7_deep_learning/1_CNN/01-basic_conv.ipynb View File

@@ -296,6 +296,15 @@
"source": [
"以上介绍了如何在 PyTorch 中使用卷积网络中的卷积模块和池化模块,接下来讲解卷积网络中几个非常著名的网络结构"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 3. Stride,Padding\n",
"\n",
"FIXME:增加这部分的解释"
]
}
],
"metadata": {


+ 2
- 2
7_deep_learning/1_CNN/04-vgg.ipynb View File

@@ -47,7 +47,7 @@
"source": [
"VGG网络的特点:\n",
"* 小卷积核和连续的卷积层: VGG中使用的都是3×3卷积核,并且使用了连续多个卷积层。这样做的好处主要有,\n",
" - 使用连续的的多个小卷积核(3×3),来代替一个大的卷积核例如(5×5)。使用小的卷积核的问题是,其感受野必然变小。所以,VGG中就使用连续的3×3卷积核,来增大感受野。VGG认为2个连续的3×3卷积核能够替代一个5×5卷积核,三个连续的3×3能够代替一个7×7。\n",
" - 使用连续的的多个小卷积核(3×3),来代替一个大的卷积核例如(5×5)。使用小的卷积核的问题是,其感受野必然变小。所以,VGG中就使用连续的3×3卷积核,来增大感受野。VGG认为2个连续的3×3卷积核能够替代一个5×5卷积核,三个连续的3×3能够代替一个7×7。\n",
" - 小卷积核的参数较少。3个3×3的卷积核参数为3×3×3=27,而一个7×7的卷积核参数为7×7=49\n",
" - 由于每个卷积层都有一个非线性的激活函数,多个卷积层增加了非线性映射。\n",
"* 小池化核,使用的是2×2\n",
@@ -521,7 +521,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.12"
"version": "3.7.9"
}
},
"nbformat": 4,


+ 11
- 6
7_deep_learning/1_CNN/05-googlenet.ipynb View File

@@ -178,19 +178,19 @@
" \n",
" self.block1 = nn.Sequential(\n",
" Conv_ReLU(in_channel, out_channel=64, kernel=7, stride=2, padding=3),\n",
" nn.MaxPool2d(3, 2)\n",
" nn.MaxPool2d(kernel_size=3, stride=2)\n",
" )\n",
" \n",
" self.block2 = nn.Sequential(\n",
" Conv_ReLU(64, 64, kernel=1),\n",
" Conv_ReLU(64, 192, kernel=3, padding=1),\n",
" nn.MaxPool2d(3, 2)\n",
" nn.MaxPool2d(kernel_size=3, stride=2)\n",
" )\n",
" \n",
" self.block3 = nn.Sequential(\n",
" Inception(192, 64, 96, 128, 16, 32, 32),\n",
" Inception(256, 128, 128, 192, 32, 96, 64),\n",
" nn.MaxPool2d(3, 2)\n",
" nn.MaxPool2d(kernel_size=3, stride=2)\n",
" )\n",
" \n",
" self.block4 = nn.Sequential(\n",
@@ -199,13 +199,13 @@
" Inception(512, 128, 128, 256, 24, 64, 64),\n",
" Inception(512, 112, 144, 288, 32, 64, 64),\n",
" Inception(528, 256, 160, 320, 32, 128, 128),\n",
" nn.MaxPool2d(3, 2)\n",
" nn.MaxPool2d(kernel_size=3, stride=2)\n",
" )\n",
" \n",
" self.block5 = nn.Sequential(\n",
" Inception(832, 256, 160, 320, 32, 128, 128),\n",
" Inception(832, 384, 182, 384, 48, 128, 128),\n",
" nn.AvgPool2d(2)\n",
" nn.AvgPool2d(kernel_size=2)\n",
" )\n",
" \n",
" self.classifier = nn.Linear(1024, num_classes)\n",
@@ -214,18 +214,23 @@
" x = self.block1(x)\n",
" if self.verbose:\n",
" print('block 1 output: {}'.format(x.shape))\n",
" \n",
" x = self.block2(x)\n",
" if self.verbose:\n",
" print('block 2 output: {}'.format(x.shape))\n",
" \n",
" x = self.block3(x)\n",
" if self.verbose:\n",
" print('block 3 output: {}'.format(x.shape))\n",
" \n",
" x = self.block4(x)\n",
" if self.verbose:\n",
" print('block 4 output: {}'.format(x.shape))\n",
" \n",
" x = self.block5(x)\n",
" if self.verbose:\n",
" print('block 5 output: {}'.format(x.shape))\n",
" \n",
" x = x.view(x.shape[0], -1)\n",
" x = self.classifier(x)\n",
" return x"
@@ -442,7 +447,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.12"
"version": "3.7.9"
}
},
"nbformat": 4,


+ 1
- 1
7_deep_learning/1_CNN/06-resnet.ipynb View File

@@ -441,7 +441,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.12"
"version": "3.7.9"
}
},
"nbformat": 4,


+ 1
- 1
7_deep_learning/1_CNN/07-densenet.ipynb View File

@@ -458,7 +458,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.12"
"version": "3.7.9"
}
},
"nbformat": 4,


+ 1
- 1
7_deep_learning/2_RNN/pytorch-rnn.ipynb View File

@@ -813,7 +813,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.8"
"version": "3.7.9"
}
},
"nbformat": 4,


+ 1
- 1
7_deep_learning/2_RNN/rnn-for-image.ipynb View File

@@ -183,7 +183,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.8"
"version": "3.7.9"
}
},
"nbformat": 4,


Loading…
Cancel
Save