I want to get some encodings for temporal data (with a highly varying number of timesteps).
The dataset is of the format: array<TemporalSample = list, SAMPLE_COUNT>
(where array
is fixed size and list
is variable).
The TemporalSample
s are simply list
s of size TemporalSample::timesteps
Currently, I use a standard RNN network of the form:
model = keras.Sequential()
model.add(layers.GRU(256, dropout=0.1, input_shape=[None, 1], return_sequences=False))
model.add(layers.Dense(len(output_names), activation="softmax"))
model.compile(optimizer='adam',
loss='categorical_crossentropy',
metrics=['accuracy'])
model.summary()
The problem is my inputs have variable lengths, if I want an auto-encoder, my output needs to be variable-length (just like my input), and I need an inverse RNN layer (something like layers.InverseGRU(output_shape=[None, 1])
) but from my reading this seems like not something that has been considered/done before.
Is this at all possible?