X_input.grad.data is NoneType

Double post from here with a follow-up.