Passing fine-tuned resnet encoder into SMP Unet

I’m using the Segmentation Models Pytorch (SMP) library to train a U-net on healthcare images. To initialize the model, you run

model = smp.Unet(

However I’d like to pass my own resnet50 (from torchvision.models) that I pre-trained on a specific dataset into this argument. When I do that, I get the following error:

AttributeError: ‘ResNet’ object has no attribute ‘startswith’

Looking in the source code, the encoder_name arg clearly expects a string, so I don’t know how I would pass in my own encoder backbone?