You need to use a model with a fixed input shape. You cannot have an input shape like this for example (None, None, 3).
If it does not solve your issue. Please upload your model (in a .zip file) and explain a little bit more what you are doing exactly so that I can better help you.
Have a good day,
Julian
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.