Save model using save_pretrainedmethod

I trained the DeTr model on custom dataset using this tutorial.

Niels Rogge Fine_tuning_DetrForObjectDetection

I was trying to save that model using save_pretrained method, but I’m getting a error.

Can someone please help me on how to save a model and load the same for inference using save_pretrained and from_pretrained methods.

Thank you so much.