class_docstr: Base class for test functions.
class_docstr_tok: ["Base","class","for","test","functions","."]
docstr: Evaluate the function on a set of points.
  
  Args:
      X: A `batch_shape x d`-dim tensor of point(s) at which to evaluate the
          function.
      noise: If `True`, add observation noise as specified by `noise_std`.
  
  Returns:
      A `batch_shape`-dim tensor ouf function evaluations.
docstr_tok: ["Evaluate","the","function","on","a","set","of","points",".","Args",":","X",":","A","`","batch_shape","x","d","`","-dim","tensor","of","point","(","s",")","at","which","to","evaluate","the","function",".","noise",":","If","`","True","`",",","add","observation","noise","as","specified","by","`","noise_std","`",".","Returns",":","A","`","batch_shape","`","-dim","tensor","ouf","function","evaluations","."]
code: def forward(self, X: Tensor, noise: bool = True) -> Tensor:
      r"""Evaluate the function on a set of points.
  
      Args:
          X: A `batch_shape x d`-dim tensor of point(s) at which to evaluate the
              function.
          noise: If `True`, add observation noise as specified by `noise_std`.
  
      Returns:
          A `batch_shape`-dim tensor ouf function evaluations.
      """
      batch = X.ndimension() > 1
      X = X if batch else X.unsqueeze(0)
      f = self.evaluate_true(X=X)
      if noise and self.noise_std is not None:
          _noise = torch.tensor(
              self.noise_std, device=X.device, dtype=X.dtype
          )
          f += _noise * torch.randn_like(f)
      if self.negate:
          f = -f
      return f if batch else f.squeeze(0)
  
imports: from __future__ import annotations
  from abc import ABC, abstractmethod
  from typing import List, Tuple, Union
  import torch
  from botorch.exceptions.errors import InputDataError
  from torch import Tensor
  from torch.nn import Module
label_desc: Use image node_id 2 for calling the BaseTestProblem obj's underlying member method code with example usage: obj.forward(X, noise) and returns: unknown