Fix not passing subsample to the gradients.