class_docstr: A generic deterministic model constructed from a callable.
  
  Example:
      >>> f = lambda x: x.sum(dim=-1, keep_dims=True)
      >>> model = GenericDeterministicModel(f)
docstr: Args:
      f: A callable mapping a `batch_shape x n x d`-dim input tensor `X`
          to a `batch_shape x n x m`-dimensional output tensor (the
          outcome dimension `m` must be explicit, even if `m=1`).
      num_outputs: The number of outputs `m`.
docstr_tok: ["Args",":","f",":","A","callable","mapping","a","`","batch_shape","x","n","x","d","`","-dim","input","tensor","`","X","`","to","a","`","batch_shape","x","n","x","m","`","-dimensional","output","tensor","(","the","outcome","dimension","`","m","`","must","be","explicit",",","even","if","`","m=1","`",")",".","num_outputs",":","The","number","of","outputs","`","m","`","."]
code: def __init__(
      self, f: Callable[[Tensor], Tensor], num_outputs: int = 1
  ) -> None:
      r"""
      Args:
          f: A callable mapping a `batch_shape x n x d`-dim input tensor `X`
              to a `batch_shape x n x m`-dimensional output tensor (the
              outcome dimension `m` must be explicit, even if `m=1`).
          num_outputs: The number of outputs `m`.
      """
      super().__init__()
      self._f = f
      self._num_outputs = num_outputs
  
imports: from __future__ import annotations
  from abc import abstractmethod
  from typing import Callable, List, Optional, Union
  import torch
  from botorch.models.ensemble import EnsembleModel
  from botorch.models.model import Model
  from torch import Tensor
label_desc: Use image node_id 1 to create a new GenericDeterministicModel object from inherited base classes: DeterministicModel with example: obj = GenericDeterministicModel(f, num_outputs)