Member-only story

Code Review: Sentiment Recurrent Neural Networks with PyTorch

Crystal X
5 min readApr 14, 2021

--

I have completed the last lesson in the Udacity PyTorch, which was very difficult indeed. PyTorch has a very steep learning curve and takes much longer to learn than another machine learning library, sklearn. The main difference between sklearn and PyTorch is the fact that PyTorch is designed for deep learning and sklearn is not. PyTorch was written in C++ as a PyThon compatible add-on module and PyTorch programs can even be saved and attached to C++ programs, but that is certainly something I am not ready for at this time.

The last lesson in the free PyTorch course that I took was about sentiment analysis, which is something I have a bit of familiarity with, having studied it in another free course I have taken with another training provider. While sklearn compatible sentiment analysis deals with tabulated data, the sentiment analysis in PyTorch is based upon a text file.

In the exercise in this post, a text document of movie reviews is trained, validated and predicted on. The link to the movie reviews can be found here:- https://github.com/lukysummer/Movie-Review-Sentiment-Analysis-LSTM-Pytorch/tree/master/data

I was unable to link the web address of the movie review to the program that I created in Google Colab, so I used control-A to select the entire document and then Control-C to…

--

--

Crystal X
Crystal X

Written by Crystal X

I have over five decades experience in the world of work, being in fast food, the military, business, non-profits, and the healthcare sector.

No responses yet