Much faster KMeans coding in Theano.