Facebook PyTorch Udacity Scholarship challenge

This blog post is about my journey through my second scholarship from Facebook and Udacity to learn the basics of neural network and build projects in deep learning using Facebook’s PyTorch framework.

Everyone knows how effective and rewarding it feels when you learn something with a community of peers who are working on the same curriculum as you. But I’ve to admit it, I had never thought e-learning would also be this much fun. All thanks to Udacity! Udacity has one of the best community managers and slack team for progressing through the coursework without any hindrance to any of the students.

But, firstly how did I even get selected to the scholarship challenge might be your question! So, one fine snowy (I stay in NY folks, and yes the struggle is real) day I bumped across this mail in my inbox announcing scholarship from Facebook and Udacity for data nerds all over the world and I knew this was my chance to take a jab at structured learning for AI using PyTorch. (Internet is so overwhelming to start with). And YEESS, I did make it to the scholarship challenge..like one among the 10,000 amazing people all over the world.

Yay, made it into the first Phase!

Well, it wasn’t too bad, until the Slack forum was overpouring with thousands of message from people. I should say, it looked very abused with lots of channels — motivational, live-help, study-buddies, regional groups, LinkedIn-connections, fun torch and more! Slack was the go-to place for any discussions and queries you had. The average estimated wait time for your reply would be close to 0.5 minutes for any question from my observation and experience.

Let’s cut the chase and get to the crux of the program. So, the coursework offered a very methodical and organized way for users to absorb the concepts of AI and deep learning, given the math behind it is extremely painful to master within a short period of time. It was structured the following way.

Introduction to Neural Networks

Introduction to the concepts of NN along with the purpose of its existence (sophisticated classification) and the pieces which make NN such as perceptron algorithm, gradient descent algorithms, entropy, dropout, regularization, and vanishing gradient issue, local and global minima. This was by far the most visited chapter by peers and myself to get hang of the jargons for the advanced neural nets. Oh yes, we also got to code the 2-layer NN and gradient descent algorithm from scratch.

Gradient Descent Algorithm

Creation and future of PyTorch Framework by the creator, Soumith Chintala

The creator himself walking us through the details of how PyTorch came into existence from research labs to deployment and how it’s been a success in modeling Neural Nets and the major improvements to the framework.

Discussion with Soumith Chintala

Convolutional Neural Network

This was my most favorite part of the course coz it deals with a lot of image datasets, and it's so cool to play around with them to create something creative out of it. Neural nets have the ability to identify the image which you throw at it and not just that, it can detect edges in an image, photoshop, style your image and the best — It can CREATE most amazing images! Some of the programs which I wrote are on Github. https://github.com/anusky95/PytorchPrograms/blob/master/README.md and https://github.com/anusky95/Convolutional-Neural-Network (Promise to push ‘em all on git soon.)

Style Transfer

This was a very interesting CNN implementation where the style of one image can be applied to the other content image and the resultant image contains the style of the second image on the first one. This is achieved by extract the feature maps and the overall content representation of the first image and applying the textures, colors, and style of the second image on the content image. An example of this is shown below in the style transformation. It was a lot of fun doing this activity (despite the time it took to train the models on Google Colab)

Style image: My canvas poster paintings
Content Image (View from RIT shuttle stop) & Result Image: Looks like an art work

Recurrent Neural Network

While CNN’s are used for images, RNNs are used for learning complex patterns from sequences of unstructured data such as Natural Language Processing. LSTM’s (Long Short Term Memory) is an advanced form of RNN as it can switch from remembering things from long term memory and short term memory and thus outperforms RNN. Learning LSTM took quite a while considering the role of the various gates.

And this is how the architecture of LSTM looks like

Final Project

The final project was to build an image classifier for 102 different species of flowers which can be downloaded from here. Since the dataset was large, it takes a lot of time to model on CPU and trained the model on Google Colab. A tutorial is worth a shot to avoid wasting a lot of time on setting it up. Udacity provided us with training and validation set only and had us upload the model on the workspace which would then test the images on the hidden test flower images. If the accuracy was at least 20%, the model was project was considered to be complete. However, a lot of us strived to achieve very good accuracy and the extremely ( I wish I could emphasize enough) helpful community of 10k peers on slack played a huge role in this. Here is the github link to the final project — https://github.com/anusky95/Udacity-PyTorch-Challenge-Scholarship-Project/

Below are some of the wonderful moments we had on slack!

This is how the final project submission day looks like!
We had Study Jams to help us rock and roll!
Announcements for side projects and fun activities
Spot me!!!! ;)

Side Project (BROWNIE POINTS)

Okay, this last bit was totally us on what we would do using PyTorch Framework. So, I decided to have some fun with RNN. I built a name-ninja generator which generates random names based on the thousands of names you feed to the model using Char-based RNN. More about the project in the next post :)


Thanks for reading the long post! ❤ :)

Follow me for more posts and articles on Data Science.

LinkedIn — https://www.linkedin.com/in/anupama-garani/

Twitter — https://twitter.com/agarani95