Error when trying to follow Deep learning example

Dears,
I strongly suspect that my question is rather fundamental and basic and less related to Deep learning but because I wanted to highlight the context hence the title of this thread.
Well, this is how I am trying to execute the "Word-By-Word Text Generation Using Deep Learning" example which uses text from Alice in Wonderland.
When calling:
ds = documentGenerationDatastore(documents);
I get the error message:
'documentGenerationDatastore' is used in Word-By-Word Text Generation Using Deep Learning.
The above message looks like an affirmative sentence, which of course I can agree with but it is a bit laconic.
Does anyone perhaps know what is causing this error?
Have nice evening to everyone :)

 採用された回答

Adam Danz
Adam Danz 2021 年 3 月 17 日
編集済み: Adam Danz 2022 年 11 月 28 日

0 投票

Updated answer (11/28/22)
The documentation page for the Word-By-Word Text Generation Using Deep Learning example has been updated to instruct users to open the example in a Live Script to access the documentGenerationDatastore.m file.
Copy the command using this button on the doc page, then execute the command from MATLAB's command window.
Original answer
I agree that the error message isn't helpful.
Based on the documentation, documentGenerationDatastore.m, should be stored on my system in,
C:\Program Files\MATLAB\R2021a\examples\nnet\main\
or on any system,
fullfile(matlabroot,'examples','nnet','main','documentGenerationDatastore.m')
and while I have the Deep Learning Toolbox and the nnet>main folder, the file is missing (r2021a). The documentation also shows how to create your own custom mini-batch datastore in Develop Custom Mini-Batch Datastore but that's not helpful to understand what should be in documentGenerationDatastore.m.
I'd contact Tech Support using: Contact Us - MATLAB & Simulink
And let us know what the resolution is.

6 件のコメント

Maciej Staszak
Maciej Staszak 2021 年 3 月 18 日
Thank you Adam for advice. I contacted support and am waiting for their response.
Meanwhile I was succesful at finding this function 'documentGenerationDatastore.m' and even succesfully passed this part of the code. But then finally there was an error in the function that trains the network. I decided to change the example to the "Pride and Prejudice" example with character embeddings. This works fine so I can get accustomed to the way Matlab works.
Have nice day!
Adam Danz
Adam Danz 2021 年 3 月 18 日
Where/how did you find the file?
Maciej Staszak
Maciej Staszak 2021 年 3 月 18 日
編集済み: Maciej Staszak 2021 年 3 月 18 日
Previously I had Matlab 2020b, and tried to run this example at that time, so it is in:
C:\Users\maciej\....\MATLAB\Examples\R2020b\deeplearning_shared\WordByWordTextGenerationUsingDeepLearningExample
When updating yesterday to 2021a I did not remove this old version. I am very new in Matlab environment but I really like it at first glance/clicks.
Adam Danz
Adam Danz 2021 年 3 月 18 日
Thanks, Maciej. But I'm still confused, not because of your comments but because of the documentation.
The r2020b documentation shows that the file should be in
fullfile(matlabroot,'examples','nnet','main','documentGenerationDatastore.m')
not in the deeplearning folder. Perhaps this is the error (in the documentation).
mark palmer
mark palmer 2022 年 11 月 23 日
Did you ever figure out how to solve this with the Alice in Wonderland text?
Adam Danz
Adam Danz 2022 年 11 月 28 日
@mark palmer see my updated answer and let us know if you have any further problems.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeDeep Learning Toolbox についてさらに検索

質問済み:

2021 年 3 月 17 日

編集済み:

2022 年 11 月 28 日

Community Treasure Hunt

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

Start Hunting!

Translated by