All operations inside model will be tracked by Autograd and the parameters will get a valid gradient during the backward pass.
However, the operations preceding the Xprime creation will not be tracked, since you detached the tensor and also used numpy (through pandas) to calculate new_stuff.