Discrete HMMs Using Deep Learning Libraries - Gradient Descent Tutorial