The given code saves a PyTorch model (best scenario in my case) to the given drive directory. Pytorch models are evaluated using two different optimizers (Adam and RMSprop). In addition to PyTorch, a classification model is also developed using keras for the same two optimizers and tested for accuracy.
The dataset used for this assignment is the rotten-tomatoes movie review dataset, which consists of 8,544 unique reviews, divided into subsets using their individual parse-trees to form the dataset of 156,060 instances. The reviews are categorized into five sentiment labels - very_positive, positive, neutral, negative and very_negative.