class_docstr: Adds PyTorch specific functions.
class_docstr_tok: ["Adds","PyTorch","specific","functions","."]
docstr: Evaluate the model given input `X`.
  
  Feed 2d `numpy.ndarray` through model and receive output as
  2d `numpy.ndarray`.
docstr_tok: ["Evaluate","the","model","given","input","`","X","`",".","Feed","2d","`","numpy.ndarray","`","through","model","and","receive","output","as","2d","`","numpy.ndarray","`","."]
code: def evaluate(self, X):
      """
      Evaluate the model given input `X`.
  
      Feed 2d `numpy.ndarray` through model and receive output as
      2d `numpy.ndarray`.
      """
      self.predictor_model.eval()
      X = torch.from_numpy(X).float()
      if self.cuda:
          X = X.to(self.device)
      with torch.no_grad():
          Y_pred = self.predictor_model(X)
      if self.cuda:
          Y_pred = Y_pred.detach().cpu().numpy()
      else:
          Y_pred = Y_pred.numpy()
      return Y_pred
  
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 4 for calling the PytorchEngine obj's underlying member method code with example usage: obj.evaluate(X) and returns: Y_pred