Deep Learning ICP 7 - VineethaG/Python_CS5590 GitHub Wiki

Deep Learning ICP 7

Team ID: 12
Class ID: 10, Vineetha Gummadi, 
Class ID: 14, Amulya Kasaraneni. 

Objective:

  • To work with different dataset

  • To compare One stack LSTM & Two stack LSTM.

Task 1: Dataset:

Code Snippet for loading new dataset:

We used the Womens Clothing E-commerce Clothing Reviews Dataset

We used review dataset of csv format in which "Text Reviews" is in 5 column and stored the text in "data.txt" for each review.

Dataset Format

Task 2:Comparing One stack LSTM & Two stack LSTM.

One Stack LSTM

rnn_cell = rnn.BasicLSTMCell(n_hidden)

Below are tensor, loss & accuracy graphs

TwoStack LSTM

rnn_cell = rnn.MultiRNNCell([rnn.BasicLSTMCell(n_hidden),rnn.BasicLSTMCell(n_hidden)])

Below are tensor, loss & accuracy graphs

Parameters

Dataset: Women’s Clothing E-commerce Reviews:
learning_rate = 0.01
training_iters = 10000
display_step = 1000
n_input = 5
# number of units in RNN cell
n_hidden = 512

One Stack LTSM:

One Stack LTSM:
Iter= 9000, Average Loss= 1.872751, Average Accuracy= 67.70%
['and', 'several', 'somewhat', 'cheap', '(net)'] - [over] vs [over]
Iter= 10000, Average Loss= 2.263454, Average Accuracy= 68.40%
['it', 'online', 'bc', "it's", 'petite.'] - [i] vs [i]
Optimization Finished!
Elapsed time:  4.769242986043294 min
Run on command line.
5 words: i happened to find it
i happened to find it in a store, and i'm glad i did a find it in and store, and i'm glad i did a find it in and store, and i'm glad i did a find

Two Stack LTSM:

 Two Stack LTSM:
Iter= 9000, Average Loss= 0.929461, Average Accuracy= 81.80%
['wanted', 'it', 'to', 'work', 'for'] - [me.] vs [me.]
Iter= 10000, Average Loss= 1.103702, Average Accuracy= 78.60%
['which', 'was', 'just', 'ok.', 'overall,'] - [the] vs [a]
Optimization Finished!
Elapsed time:  10.7495547970136 min
Run on command line.
5 words: i happened to find it
i happened to find it up! - but comfortable in to dress that the top half had comfortable directly the zipper half had comfortable directly the zipper half had comfortable directly 

Observation:

We observed that accuracy is more with two stack. With two stack accuracy is 78.60% whereas with one stack is 68.40%

⚠️ **GitHub.com Fallback** ⚠️