I'm trying to train a CNN model on keras, my data looks like this
type(datain)
<class 'list'>
len(datain)
35000
type(datain[0])
<class 'numpy.ndarray'>
datain[0].shape
(256,256,1)
And being my input data a list of arrays I get this error when trying to train the network
AttributeError: 'list' object has no attribute 'shape'
but when trying to do something like np.array(datain) as suggested here https://github.com/keras-team/keras/issues/4823 my computer freezes/crashes. defining my input using python list takes like 60 seconds in total, but if I try as numpy arrays from the beginning but takes like 1 sec per (256,256,1) array, and is way too much time if I intent of doing various test and modifications to my network,
is there any work around for this problem?
any way to use lists for keras?
a different way to define a numpy array?
or am I misunderstanding something?
np_data = np.array(datain[:100])and see if the error still occurs.