I have a list of numpy arrays which are to be given as input to the neural network model by a generator. However, the shape of numpy arrays can be different (*,1) where * is the dynamic number that is populated for every image. How I can write it in generator? I tried to give this like this in the neural network model.
preds = Input(shape=(None,1),name='preds')
In generator, I am trying to give something like this:
result = np.zeros((batchsize,None,1))
for i in range(batch_size):
result[i,:,:]=predictions
But this is giving me the error that TypeError: 'NoneType' object cannot be interpreted as an integer
in declaration of np.zeros(batchsize,None,1)
. What is the correct way to give dynamic shape for a numpy array.