Error(s) in loading state_dict for ResNet: Missing key(s) in state_dict:

good afternoon,

i tried to implement the source code in the link below. after finishing I tried to load the best_model.pt model using the following code, but i get the error:Error(s) in loading state_dict for ResNet: Missing key(s) in state_dict:

from timm import create_model

import torch

modelgray = create_model(

    "resnetrs50",

    pretrained='True',

    num_classes=3,

    in_chans=1,

)

state_dict = torch.load(‘best_model-gray.pt’, weights_only=True, map_location=‘cpu’)

modelgray.load_state_dict(state_dict)

this is how i call the main.py in colab:
!python main.py --data_dir /train_test_dataset_path/ --epochs 4 --greyscale 1 --pretrained 1 --freeze 1 --batch-size 32 --num_chans 1

thanks an advance