Follow along with this Free Guided TensorFlow project. In this free Python Project, we will use TensorFlow to build a deep learning model that will generate names. Here we will mix names of Indian Gods with Anime characters, why? Well because we wanted to have a little fun and be a little creative with our NLP TensorFlow Text Generation Project.
Name generation is actually easier than you would think, simply put your deep learning model that predicts the next character in a loop. The hard part is designing your deep learning model to be accurate but also a little crazy so we get some interesting generated names.
In this project, we use the Sequential model in TensorFlow to build our text generation model. Inside the sequential model, we will use the recurrent layer, LSTM, or long short term memory. This recurrent layer is followed by a Dropout layer then 3 blocks of Dense then a Dropout combination following the recurrent layer. We use dropout layers in between each section of our deep learning model to help prevent overfitting. Overfitting happens with NLP more so than other data types and because of this means, we need to be extra careful to prevent overfitting in our text generations NLP model.
For our output layer, we will use a Dense fully connected layer with a softmax activation. We have to use the number of characters in our vocabulary as the number of neurons in our output layer. The hardest part about a text generation project is the number of classes or characters we will be predicting. To start I use 24 neurons for our predictions but this will be easy to change.
Follow Data Science Teacher Brandyn