How do I feed a tensor in Keras model using a numpy array values?
Just use np.expand_dims to extend the first dimension. The 4D tensor means that you are having a batch of some images with 3 channels. Since you have just one image, add into an array and give it to the model or use np.expand_dims(image_ref, axis=0).
I trying to feed a keras model tensor with numpy array values. But the tensor is 4D and the array is 3D. How can I to convert this 3D numpy array (128, 128, 3) in a 4D (?, 128, 128, 3) tensor?