Skip to content

Commit fb71635

Browse files
Merge pull request MicrosoftDocs#32 from callezenwaka/patch-4
Update 05c - Transfer Learning (PyTorch).ipynb
2 parents 5301f8d + fd082a8 commit fb71635

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

05c - Transfer Learning (PyTorch).ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
"\n",
9292
"The pretrained model has many layers, starting with a convolutional layer that starts the feature extraction process from image data, and ending with a fully-connected linear layer that maps the extracted features to 1000 class labels.\n",
9393
"\n",
94-
"For feature extraction to work with our own images, we need to ensure that the image data we use the train our prediction layer has the same number of features (pixel values) as the images originally used to train the feaure extraction layers. The model does not explicitly give this size, but the first convolutional layer applies by a 7x7 kernel with a stride of 2x2 and results in 64 feature values, so the original size must be 64 x (7 ÷ 2), which is 224.\n",
94+
"For feature extraction to work with our own images, we need to ensure that the image data we use to train our prediction layer has the same number of features (pixel values) as the images originally used to train the feaure extraction layers. The model does not explicitly give this size, but the first convolutional layer applies by a 7x7 kernel with a stride of 2x2 and results in 64 feature values, so the original size must be 64 x (7 ÷ 2), which is 224.\n",
9595
"\n",
9696
"PyTorch includes functions for loading and transforming data. We'll use these to create an iterative loader for training data, and a second iterative loader for test data (which we'll use to validate the trained model). The loaders will transform the image data to match the format used to train the original resnet CNN model, convert the image data into *tensors* (which are the core data structure used in PyTorch), and normalize them.\n",
9797
"\n",
@@ -502,4 +502,4 @@
502502
},
503503
"nbformat": 4,
504504
"nbformat_minor": 2
505-
}
505+
}

0 commit comments

Comments
 (0)