* Generate text using the LSTM model. * * @param {number[]} sentenceIndices Seed sentence, represented as the * indices of the constituent characters. * @param {number} length Length of the text to generate, in number of * characters. * @param {number} temperature Temperature p
(sentenceIndices, length, temperature)
| 121 | * @returns {string} The generated text. |
| 122 | */ |
| 123 | async generateText(sentenceIndices, length, temperature) { |
| 124 | onTextGenerationBegin(); |
| 125 | return await model.generateText( |
| 126 | this.model, this.textData_, sentenceIndices, length, temperature, |
| 127 | onTextGenerationChar); |
| 128 | } |
| 129 | }; |
| 130 | |
| 131 | /** |
no test coverage detected