Hi everyone, I would like to use a pre-trained Resnet model, but with some modifications. I would like to change the input from 3 channels (RGB) to gray scale (1 input). I would also like to change the output from 1000 classes to 10. Furthermore, it would be interesting to implement a deconvnet to see the feature maps at the different filters.
I do all this changes in the original Resnet code, and save it as resnet_adapted in the same folder. How do I import this model pre-trained? Could I freeze certain layers, just like in normal transfer learning?
I have been advised to use:
import sys
sys.path.append(r'C:\Users\Jacobo\anaconda3\envs\deep learning 3\Lib\site-packages\torchvision\models')
import resnet_adapted
but I think I cannot obtain a pre-trained model from that, nor freeze specific layers.
Thanks in advance for the help!