Skip to content

A highly optimized version of Andrew Trask's Sentiment Classification from Deep Learning ND on Udacity

Notifications You must be signed in to change notification settings

pranjalchaubey/Optimized-Sentiment-Classification-using-Numpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Optimized Sentiment Classification using Numpy

A highly optimized version of Andrew Trask's Sentiment Classification from Deep Learning ND on Udacity


I have taken Andrew Trask's notebook on Sentiment Classification and have tried to hyper optimize a number of routines following a set of two rules,

  1. Use vectorization as much as possible
  2. Avoid loops at all costs


To search for the optimizations directly, do a Ctrl+F and look for the My Implementation tag.


You would use such techniques in writing production ready code in Python. My optimizations are on an average 25% faster than the default solution, with over 250% (2.5x!) performance gain in a few places.


~2.5x performance improvement!


PS - I think Andrew Trask didn't use the complicated expressions in order to keep the whole tutorial beginner friendly - Kudos to him!

About

A highly optimized version of Andrew Trask's Sentiment Classification from Deep Learning ND on Udacity

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published