Theano based CPU/GPU parallel implementation