From looking at the actual message, I think the problem is not your X_train_torch but the tensor you try add/subtract/… to/from/with it since they need to have the same type. Can you post a small snippet to reproduce the error?