udacity / deep-learning-v2-pytorch

Projects and exercises for the latest Deep Learning ND program https://www.udacity.com/course/deep-learning-nanodegree--nd101
MIT License
5.26k stars 5.32k forks source link

[intro-to-pytorch/Part 8 - Transfer Learning (Exercises).ipynb] #393

Closed UrszulaCzerwinska closed 2 years ago

UrszulaCzerwinska commented 2 years ago

Thank you for great tutorials.

I would like to understand how you define the input size to the linear layer to be 1024.

I don't undersand how it relates to the image size [3, 224, 224].

We saw in the previous lessons that the input size to a linear net would be 3224224.

Thank you in advance !

ronny-udacity commented 2 years ago

We only define the classifier layers, which contains 2 fully connected layer. The input to the first classifier's layer takes the output from the pre-trained densenet instead of the image data.