Janinanu / Retrieval-based_Chatbot

39 stars 8 forks source link

Possible to Implement bi-LSTM? #1

Open thombrey-vinil opened 6 years ago

thombrey-vinil commented 6 years ago

Is it possible to implement a bidirectional LSTM just by changing parameter 'bidirectional = True' in the code?

Please let me know if this works.

Janinanu commented 6 years ago

I think it should work in general. But you might need to adjust the way you access and slice the dimensions, because the output of a bidirectional LSTM will have a different dimension than the output of a unidirectional LSTM, I suppose. See the PyTorch documentation for details. But I never tried it... Also, using a bidirectional LSTM might lead to even more overfitting.