In this segment, you’ll learn how to generate text using an RNN. Specifically we’ll use an RNN to generate C code. For those who’re not familiar with C, it’s general purpose programming language like Python. But C was developed in THE 70S. It is much faster than Python. The numpy library is written in C because Python is very slow in linear matrix operations. The Linux operating system is written using C. And we’ll use the Linux kernel code to train our RNN model.
You can find the code in this GitHub repository. Download the code and make sure that you gather all the C files present inside the folders of the kernel at one single place. Also, download the Jupyter notebook attached below.
Let’s hear from professor Raghavan about the approach that we’ll use to generate the code.
You could use a one-to-many model or a many -to -one model. In the following demo, you’ll see how to generate text using a many-to-one model. Let’s now look at how a many-to-one model can be used to generate the code. Then we’ll get started with the exercise by loading the data and preprocessing it.
Now that the data is loaded, we are ready to preprocess it.
Report an error