Read the .npy file and use tf.data.Dataset.from_tensor_slices
import tensorflow as tf
import numpy as np

with open('image.npy', 'rb') as f:
          a = np.load(f)
print(a)
ds = tf.data.Dataset.from_tensor_slices(a)
list(ds.as_numpy_iterator())


Output

[128 128   3]
[128, 128, 3]