While building the pet classifier in lesson 1 we used transfer learning, specifically resnet34. Now the actual resnet model is trained to predict 1000 classes, so in order to use it for our purpose(37 classes) we could either modify or add certain layer so that the output dimension is 37.
But in the notebook I saw we directly use
models.resnet34 and do not modify it. Hence I decided to check the resnet34 architecture in fastai and indeed it had the output dimension to be 37. I went ahead and checked the architecture for different models like alexnet, densenet, squeezenet etc and all of them had the output dimension to be 37.
Can anyone please help me out with the below questions:
1.) Are the different architectures in models specifically altered for the lesson 1 notebook or does the model figures it out automatically?
2.) If I want to add certain layers at the end, how do I proceed about it?
Thanks in advance