How do I use a custom trained model to then train on again, using a different dataset?

I have a ResNet50 model that was used for transfer learning on a custom dataset. That new, custom model was saved as a SavedModel format. I want to use that model to then use transfer learning again, on a different dataset. The previous dataset and the new one I want to use are very similar, so I think the model will train better. How do I load the custom model again so I can train?

This is how the ResNet50 model was loaded in (using TF 1.15, but I’m using TF 2.10 right now)

net = ResNet50(include_top = False, weights = 'imagenet', input_tensor = None,
              input_shape = (IMAGE_SIZE[0], IMAGE_SIZE[1], 3)),

Hi @GB1

Welcome to the TensorFlow Forum!

Could you please share the standalone code of ResNet50 model and the new Custom model to replicate and understand the issue better? Thank you.

Thanks for the response! But I ended up going in a different direction when I found out that the custom model was saved with a ‘serve’ tag and I couldn’t load it in to train off of, without having to rewrite and retrain to save that custom model in a ‘train’ tag. Thanks again!

1 Like