1st vectorization
vectorization of Theta_grad