class_docstr: A deterministic model defined by a single sample `w`.
  
  Given a base model `f` and a fixed sample `w`, the model always outputs
  
      y = f_mean(x) + f_stddev(x) * w
  
  We assume the outcomes are uncorrelated here.
docstr: Args:
      model: The base model.
      w: A 1-d tensor with length model.num_outputs.
          If None, draw it from a standard normal distribution.
      dim: dimensionality of w.
          If None and w is not provided, draw w samples of size model.num_outputs.
      jitter: jitter value to be added for numerical stability, 1e-8 by default.
      dtype: dtype for w if specified
      device: device for w if specified
docstr_tok: ["Args",":","model",":","The","base","model",".","w",":","A","1-d","tensor","with","length","model.num_outputs",".","If","None",",","draw","it","from","a","standard","normal","distribution",".","dim",":","dimensionality","of","w.","If","None","and","w","is","not","provided",",","draw","w","samples","of","size","model.num_outputs",".","jitter",":","jitter","value","to","be","added","for","numerical","stability",",","1e-8","by","default",".","dtype",":","dtype","for","w","if","specified","device",":","device","for","w","if","specified"]
code: def __init__(
      self,
      model: Model,
      w: Optional[Tensor] = None,
      dim: Optional[int] = None,
      jitter: Optional[float] = 1e-8,
      dtype: Optional[torch.dtype] = None,
      device: Optional[torch.dtype] = None,
  ) -> None:
      r"""
      Args:
          model: The base model.
          w: A 1-d tensor with length model.num_outputs.
              If None, draw it from a standard normal distribution.
          dim: dimensionality of w.
              If None and w is not provided, draw w samples of size model.num_outputs.
          jitter: jitter value to be added for numerical stability, 1e-8 by default.
          dtype: dtype for w if specified
          device: device for w if specified
      """
      super().__init__()
      self.model = model
      self._num_outputs = model.num_outputs
      self.jitter = jitter
      if w is None:
          self.w = (
              torch.randn(model.num_outputs, dtype=dtype, device=device)
              if dim is None
              else torch.randn(dim, dtype=dtype, device=device)
          )
      else:
          self.w = w
  
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 FixedSingleSampleModel object from inherited base classes: DeterministicModel with example: obj = FixedSingleSampleModel(model, w, dim, jitter, dtype, device)