thank you @ptrblck I did it as sequential as you said, but my problem is still not fixed.  The ready-made models and weights I use are not suitable for my dataset.  What do you think, could it be caused by this?  and is my code correct