Posts

In Which a Project was Undertaken, Part 4

Image
The Meat of the Matter Got your multipass? ( Wikipedia link , IMDB link ) In the previous blogs, I talked about my motivation for studying deep learning ( link ), my choice of a machine ( link to part 1 , link to part 2 ), my search for appropriate online courses and my review of the courses I took ( link to part 1 , link to part 2 , link to part 3 ), and finally my choice of an initial project and preparations for the project ( link to part 1 , link to part 2 , link to part 3 ). And finally it's time to dig in to the results of the project, which is a simple dialogue generator for Star Trek: The Next Generation characters. The neural network and input data have all been set up, and fun can begin! Run 1 For the first few runs, I had not trimmed the inputs as I had explained in the previous blog. It was only later when I decided to try to improve the run time that I switched. The model summary of the neural network was as follows: Model: "sequential" ____...

In Which a Project was Undertaken, Part 3

Image
Now that my system is set up to run neural network training locally (described in In Which a Project was Undertaken, Part 2 : link ). I started to experiment with some trial runs with training the network to be able to generate dialogue. Massaging the Data Trust the data (Data and Lore, androids from Star Trek: The Next Generation ( Wikipedia link , IMDB link ) I had collected Season 7 of the classic Star Trek: The Next Generation transcripts from this site ( link ), representing 26 hours of dialogue which can be used as input for training, but it turns out that using this data directly posed several issues. To prepare the data for ingestion by the neural network, it needs to be preprocessed, trimming off all the fat and indigestible bits. First I removed all the stage directions such as [Bridge], [OC], (Picard sits down), since that is not necessary for dialogue generation. Luckily all such directions and descriptions were contained between parentheses or square brackets,...

In Which a Project was Undertaken, Part 2

Image
Before I get into the nitty-gritty of how I trained the neural network, I want to go over how I set up the environment for the training. There is quite a bit of detail involved, which I want to note down both as a reminder to myself, in case I ever need to repeat the process, and to show everyone what steps were necessary. See the last blog if you want to know which projects I considered ( In Which a Project was Undertaken, Part 1 :  link ). Maximum Power! I turn all my processing power up to 11 ( Wikipedia link , IMDB link ) At first I tried running the training on Google Colab, since I was used to doing so from the class assignments in the Coursera specializations  (see In Which Instructions were Sought, Part 1 : link , Part 2 : link , Part 3 : link for more details) . It was fine to run it in Colab back then, the models were small and most finished training very quickly, usually taking no more than 15~20 minutes to train a few hundred epochs, so there was no press...

In Which a Project was Undertaken, Part 1

Image
With two Coursera specializations under my belt (which I detailed in In Which Instructions were Sought, Part 1 ( link ), Part 2 ( link ), and Part 3 ( link )), it's time to put theory into practice and make something new. What's the big idea? Go Big or Go Home? ( YouTube link ) I have been trying to come up with interesting projects for a while, and here is a list of some of the ideas that I think might be worth exploring: ______________________________________________________ Predicting the origin of a name: In today's modern global society, you often get the chance to meet people from faraway places. Sometimes you hear a name, and you can't place where the person is from. For example, typically Chinese and Korean names have three syllables, but to non-Koreans and non-Chinese, it might be difficult to tell them apart. A neural network can be trained to categorize the name, in essence a classification task with all the different origins. The difficulty i...