Blog‎ > ‎

Deep Learning, TensorFlow and NLTK

posted Nov 7, 2017, 7:12 AM by MUHAMMAD MUN`IM AHMAD ZABIDI   [ updated Nov 7, 2017, 7:17 AM ]
After successfully installing TensorFlow on the iMac, we need to install another copy of Spyder.

BigMac:~ munim$  source activate tensorflow
(tensorflow) BigMac:~ munim$  conda install spyder

Then, time check it out with a Sentiment Analysis problem. This nice blog by Rachit Mishra has a tutorial.

https://becominghuman.ai/deep-learning-using-tensorflow-and-nltk-analyzing-corpuss-sentiments-part-1-bec9d6c1051

Hit Github repo is at:

https://github.com/rachit-mishra/NLTK_SentimentAnalysis_TensorFlow.git

Making sure Spyder is installed in the Python virtual environment I was in, the commands given were:

(tensorflow) BigMac:~ munim$  cd Bitbucket
(tensorflow) BigMac:Bitbucket munim$ git clone https://github.com/rachit-mishra/NLTK_SentimentAnalysis_TensorFlow.git
(tensorflow) BigMac:Bitbucket munim$ cd NLTK_SentimentAnalysis_TensorFlow
(tensorflow) BigMac:NLTK_SentimentAnalysis_TensorFlow munim$ time python Sentiment.py
    .
    .
    .
Epoch 0 completed out of 10 loss: 67.907337606
Epoch 1 completed out of 10 loss: 49.8067501187
Epoch 2 completed out of 10 loss: 39.1767932475
Epoch 3 completed out of 10 loss: 27.8834503293
Epoch 4 completed out of 10 loss: 20.3667399287
Epoch 5 completed out of 10 loss: 20.9853808284
Epoch 6 completed out of 10 loss: 18.893711742
Epoch 7 completed out of 10 loss: 16.4990394972
Epoch 8 completed out of 10 loss: 23.0452921689
Epoch 9 completed out of 10 loss: 16.1678221859
Accuracy: 0.929137

real    0m29.963s
user    0m45.665s
sys     0m2.463s


(tensorflow) BigMac:NLTK_SentimentAnalysis_TensorFlow munim$


Comments