BiLSTM for sequence to sequence G2P conversion (DNN)
2 次查看(过去 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!
0 个评论
回答(1 个)
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:
https://www.mathworks.com/help/deeplearning/examples/classify-sequence-data-using-lstm-networks.html
For an example on having a sequence as an output, have a look at:
2 个评论
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
2022-7-5
编辑: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 Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!