Implementing the project

Now that we know how an RNN is able to build a character-level model, let's implement the project to generate our own words and sentences through an RNN. Generally, RNN training is computationally intensive and it is suggested that we run the code on a graphical processing unit (GPU). However, due to infrastructure limitations, we are not going to use a GPU for the project code. The mxnet library allows a character-level language model with an RNN to be executed on the CPU itself, so let's start coding our project:

# including the required librarieslibrary("readr")library("stringr")library("stringi")library("mxnet")library("languageR")

To use the languageR library's ALICE'S ADVENTURES IN WONDERLAND book text and load ...

Get R Machine Learning Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.