Speed trick: do not compute the gradient for input.