Am I using the transfer learning using TIMM correctly

Hi,
I am trying to do a binary image classification.
I am using model zoo of timm.
I just want to confirm whether I am doing the transfer learning correctly or not.
Below is my model loading code -

import timm
model_transfer = timm.create_model('convnext_tiny_in22k', pretrained=True,num_classes=2) # noqa

Then passing the model to run on the dataset
Please let me know of any other suggestions also, if any.
Thanks.

It looks correct to me.
If it is binary image classification, probably you can pass in_chans=1 to timm.create_model(). You can decide based on your use case.

1 Like

Images are RGB, I really don’t think I’ll need to change the in_chans though.