I am trying to create a variable-sequence length data for LSTM model.So, i created a list of numpy arrays of variable length. For example, one array is of length => (11,20) and other is of length => (9,20).Here 20 is the number of features and 11/9 denote sequence length
Each array has zeros and a numerical value(class index) at the end.
If audio file belongs to class index = 1 and number of frames are 8 then y will be [0,0,0,0,0,0,0,1]
I wanted to know that when model.fit is called on each variable length audio data, then last Dense layer() will have output shape equal to number of frames the audio has
So, how can I create a variable output shape of Dense layer(8 or 9 or 11)
I do not want to pad sequences instead give a 'None' in LSTM input layer shape.
But, on converting into categorical, I get error: setting array element with sequence.
Here , 11 is number of classes
y_train=to_categorical(y_train,11)
y_test=to_categorical(y_test,11)
Tensorflow version : 1.3.0
Keras version : 2.0.9