I have a list X in python which contains 20000 images of dimension (100,100,3) each. Each of the images is of type numpy.ndarray. I wish to input this list of images as the training vector for a CNN model using model.fit(X) in Tensorflow. However doing so gives me the following error:
ValueError: Failed to find data adapter that can handle input: (<class 'list'> containing values of types {"<class 'numpy.ndarray'>"}), (<class 'list'> containing values of types {"<class 'numpy.int64'>"})
Would converting list X into a numpy.ndarray of dimensions (20000,100,100,3) help?
If yes, how can I do that?
If not, could you please suggest what can be done?
np.array(X)produce? Especially what's theshapeanddtype? Beware of 1d array with object dtype - the means the list contains arrays that differ in shape.