Sets or disables gradient history.
autograd_set_grad_mode(enabled)
enabled
bool wether to enable or disable the gradient recording.