deepjavalibrary / djl

An Engine-Agnostic Deep Learning Framework in Java
https://djl.ai
Apache License 2.0
4.05k stars 648 forks source link

BiLSTM support #725

Closed raghukiran1224 closed 3 years ago

raghukiran1224 commented 3 years ago

Description

Support for BiLSTM layer in DJL.

Will this change the current api? How?

This will add a new API for layers similar to LSTM, CNN, etc. It should not effect any other APIs.

Who will benefit from this enhancement?

Folks using BiLSTM models, several new models use BiLSTM layers similar to BERT.

References

zachgk commented 3 years ago

There is an option for bidirectional as part of the LSTM block. You can set it like:

Block biLSTM = LSTM.builder()
  .optBidrectional(true)
  ...
  .build()

Is that what you are looking for?

raghukiran1224 commented 3 years ago

Perfect, thank you @zachgk - this is what I was looking for :)

Closing this issue!