shobrook / sequitur

Library of autoencoders for sequential data
MIT License
426 stars 57 forks source link

Fix issues / Enhance code in LSTM AE #7

Closed Quoding closed 1 year ago

Quoding commented 3 years ago

Fix deprecation issue in MSELoss (reduction is now the proper keyword, 'sum' is the mode it used to operate in so I preserved it here) Fix issue where squeezing x in lstm decoder would result in a 1D Tensor, thus returning an error on torch.mm Add gradient clipping Add device argument to quick_train (also goes for train_model and get_encodings)

shobrook commented 3 years ago

Thanks for opening this. What testing did you do?

Quoding commented 3 years ago

Good question.

Testing was mostly limited to my use case as I did not bother creating unit tests for this.

I'm not gonna lie: I know the delta in additions and deletions looks big, but most of that is just due to black's formatting which I forgot to remove before saving as well as premade functions from pytorch. I did not do extensive testing beyond my use case.

If you spotted something, let me know and I'll commit a fix.