BiLSTM for sequence to sequence G2P conversion (DNN)

1 次查看(过去 30 天)
Hello all,
I would like to input a sequence to a BiLSTM model and also output a sequence. But I am not able to find any document on how to input to a BiLSTM model on MATLAB. Please let me know on how to feed the network and how to set the parameters.
Regards and thanks in advance!

回答(1 个)

Asvin Kumar
Asvin Kumar 2019-8-2
You can use the sequenceInputLayer to input a sequence to the bilstmLayer. To output a sequence set the ‘OutputMode’ parameter to ‘sequence’.
The help page for the sequenceInputLayer is:
For an example on using the layer to input a sequence, have a look at:
For an example on having a sequence as an output, have a look at:
  2 个评论
mariam mughees
mariam mughees 2021-10-12
If i dont have deep learning tool for matlab can i simulate LSTM on set up as i have 2017b version of MATLAB.Can any one please guide?
Cy 'kkm' K'Nelson
编辑:Cy 'kkm' K'Nelson 2022-7-5
@mariam mughees, not a MATLAB answer, but yes, sure. Just use other tools, there are plenty open-source high-quality frameworks around. Arguably, the two most popular are TensorFlow and PyTorch. TF has subsumed another framework, Keras, that is as simple to use as MATLAB DNN toolbox (I never used one, but it looks similar from Asvin's links), so you can try it first. Google has a Web site https://colab.research.google.com/, with a Jupyter-like interface, where you can run experiments for free, even with a GPU (training time is generous but limited, tho), and TF is even preinstalled, so you just open it and start playing. Your Jupyter-compatible notebooks are stored at your Google Drive. https://www.tensorflow.org/ has very detailed tutorials on Keras, which I suggest for its simplicity and potential to port model back to MATLAB, if it comes to that, which also apparently expresses models as a stack of predefined layers. If you understand DNN, you'll Keras at a rocked speed in a day, it's very simple to use.
I think you did this, but just in case, google for "G2P DNN" (no quotes), and you'll find papers on existing implementations.
Beware that BLSTMs are a pig to train, and converge slowly. Transformers are naturally a good choice for G2P, as both words and prons have a known maximum length.
G'luck!

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Image Data Workflows 的更多信息

标签

产品


版本

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by