class_docstr: Adds PyTorch specific functions.
class_docstr_tok: ["Adds","PyTorch","specific","functions","."]
docstr: Extend the base `_validate_input` to send data to GPU when required.
docstr_tok: ["Extend","the","base","`","_validate_input","`","to","send","data","to","GPU","when","required","."]
code: def validate_input(self, X, Y, A):
      """Extend the base `_validate_input` to send data to GPU when required."""
      X = torch.from_numpy(X).float()
      Y = torch.from_numpy(Y).float()
      A = torch.from_numpy(A).float()
  
      if self.cuda:
          X = X.to(self.device)
          Y = Y.to(self.device)
          A = A.to(self.device)
  
      return X, Y, A
  
file_path: fairlearn/fairlearn/adversarial/_pytorch_engine.py
imports: from ._backend_engine import BackendEngine
  from ._constants import _MODEL_UNRECOGNIZED_STR, _MODEL_UNRECOGNIZED_ITEM
label_desc: Use image node_id 9 for calling the PytorchEngine obj's underlying member method code with example usage: obj.validate_input(X, Y, A) and returns: X,  Y,  A