Convert images to tensor

Hi, I am trying to train this model:,

But I keep getting this error:
ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type tensorflow.python.framework.ops.EagerTensor).

The problem seems to be the format of the images I am trying to feed the model.
Does anyone had a similar problem and can help?