1
$\begingroup$

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 TemporalSamples are simply lists 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?

$\endgroup$
10
  • $\begingroup$ As I wrote for the other post, it's not clear to me whether this is a programming issue. Can you clarify this? $\endgroup$
    – nbro
    Commented Apr 11, 2021 at 1:48
  • 1
    $\begingroup$ @nbro I'm asking if I can build a RNN auto encoder - using python examples for context $\endgroup$ Commented Apr 11, 2021 at 2:03
  • $\begingroup$ For some reason, it wasn't clear to me after the first reading that you just want to build an AE with recurrent layers. $\endgroup$
    – nbro
    Commented Apr 11, 2021 at 2:05
  • $\begingroup$ @nbro the main problem is i have variable length timesteps $\endgroup$ Commented Apr 11, 2021 at 2:06
  • $\begingroup$ Ok, I will leave this post open, although you also asked the same question here, so that maybe someone tries to give you an answer ;) $\endgroup$
    – nbro
    Commented Apr 11, 2021 at 2:13

0

You must log in to answer this question.