Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
cezannec authored Apr 30, 2018
1 parent 69aa2ed commit d6faf99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 1_5_CNN_Layers/4_3. Classify FashionMNIST, solution 2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,14 @@
"x = self.pool(F.relu(self.conv1(x)))\n",
"```\n",
"\n",
"Best practice is to place any layers whose weights will change during the training process in `__init__` and refer to them in the `forward` function; any layers or functions that always behave in the same way, such as a pre-defined activation function, should appear *only* in the `forward` function.\n",
"You must place any layers with trainable weights, such as convolutional layers, in the `__init__` function and refer to them in the `forward` function; any layers or functions that always behave in the same way, such as a pre-defined activation function, may appear *only* in the `forward` function. In practice, you'll often see conv/pool layers defined in `__init__` and activations defined in `forward`.\n",
"\n",
"#### Convolutional layer\n",
"The first convolution layer has been defined for you, it takes in a 1 channel (grayscale) image and outputs 10 feature maps as output, after convolving the image with 3x3 filters.\n",
"\n",
"#### Flattening\n",
"\n",
"Recall that to move from the output of a convoluttional/pooling layer to a linear layer, you must first flatten your extracted features into a vector. If you've used the deep learning library, Keras, you may have seen this done by `Flatten()`, and in PyTorch you can flatten an input `x` with `x = x.view(x.size(0), -1)`.\n",
"Recall that to move from the output of a convolutional/pooling layer to a linear layer, you must first flatten your extracted features into a vector. If you've used the deep learning library, Keras, you may have seen this done by `Flatten()`, and in PyTorch you can flatten an input `x` with `x = x.view(x.size(0), -1)`.\n",
"\n",
"### TODO: Define the rest of the layers\n",
"\n",
Expand Down

0 comments on commit d6faf99

Please sign in to comment.