tejaslodaya / timeseries-clustering-vae

Variational Recurrent Autoencoder for timeseries clustering in pytorch
GNU General Public License v3.0
462 stars 82 forks source link

Using variable length data #9

Open danielshin1 opened 3 years ago

danielshin1 commented 3 years ago

Hi tejaslodaya,

First, thank you for sharing the repo!

I'm currently trying to run the autoencoder on trajectory data(with x, y coordinates) that are variables in length. It's mentioned in the readme that. "The length of timeseries may vary from sample to sample. Conventional techniques only work on inputs of fixed size." So I was wondering if the current implementation already supports variable length data or do I need to modify the code for my purpose (similar to this https://towardsdatascience.com/taming-lstms-variable-sized-mini-batches-and-why-pytorch-is-good-for-your-health-61d35642972e) with pack_padded_sequence and pad_packed_sequence.

Thanks!

shreejalt commented 3 years ago

Yes, I have the same doubt. My data contains variable-length sequences. But how to incorporate the packed padded sequence and pad_packed_Sequence in the decoder part, as in this code, it only takes the final hidden state from the encoder from initialization for the decoder hidden state.

@danielshin1 if you have figured it out can you let me know about the variable length thingy?