Transfer Learning, using Resnet18 for regression

Hi,
I am relatively new in this field and I would really appreciate if someone could help me. In Transfer learning, for example, using ResNet-18, which is designed for classification problem, is it possible to use it for regression problem? I think it is possible but some changes are required including,

  • using “mean squared error” loss instead of cross entropy loss,
  • changing the number of output units from 1000 (the number of classifications in Resnet)to 1,

If you also think it is possible to use Resnet 18 for regression problems, is there any other modifications I need to apply?

Thanks so much and best regards,
Mo

Please look at lectures from courses 3 and 4 of deep learning specialization. They go into details on when and how to apply transfer learning.

Do clarify in your post as to what your exact problem is. A regression problem could be one of:

  1. Predicting the price of a house from the area in square feet (can’t use resnet-18 here since resnet-18 was trained on images and this problem has nothing to do with images)
  2. Predicting age of a person based on their hair color (resnet-18 is worth considering as a base model)