Update 3_neural_networks_tutorial.ipynb

x = x.view(-1, self.num_flot_features(x))中self.num_flot_features未与下方 def num_flat_features(self, x):对应导致报错。
This commit is contained in:
飒白 2021-03-18 15:47:55 +08:00 committed by GitHub
parent 356db299fa
commit 219309ac97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -92,7 +92,7 @@
" x = F.max_pool2d(F.relu(self.conv1(x)), (2, 2))\n",
" # If the size is a square you can only specify a single number\n",
" x = F.max_pool2d(F.relu(self.conv2(x)), 2)\n",
" x = x.view(-1, self.num_flot_features(x))\n",
" x = x.view(-1, self.num_flat_features(x))\n",
" x = F.relu(self.fc1(x))\n",
" x = F.relu(self.fc2(x))\n",
" x = self.fc3(x)\n",