Same output prediction

I am getting the same prediction for every input image. Although my model has an accuracy of 95%.What is the reason for it? I’ve checked everything and it looks fine.
Screenshot 2022-09-10 214515
Screenshot 2022-09-10 214500
Screenshot 2022-09-10 214444

Which assignment are you referring to?

Is this a duplicate of this ?

I have not figured out why yet, but it turns out that “predict” with the Residual Net model trained in the C4 W2 A1 assignment does not work properly with a single input. If you give it a batch of inputs, it works fine. Note that “predict” is not recommended for small batches for efficiency reasons: they recommend that you just use the __call__() method as in:

preds = model(inputs)

But when I try that, I get exactly the same results: single inputs don’t work, but batches do.

This is a duplicate of this other thread. I made a more complete response over there. Please have a look.