class_docstr: A transform that returns a subset of its input's features.
  along a given tensor dimension.
class_docstr_tok: ["A","transform","that","returns","a","subset","of","its","input","'s","features",".","along","a","given","tensor","dimension","."]
docstr: Initializes a FeatureSelector instance.
  
  Args:
      indices: A LongTensor of feature indices.
      dim: The dimensional along which to index features.
docstr_tok: ["Initializes","a","FeatureSelector","instance",".","Args",":","indices",":","A","LongTensor","of","feature","indices",".","dim",":","The","dimensional","along","which","to","index","features","."]
code: def __init__(
      self, indices: Iterable[int], dim: Union[int, LongTensor] = -1
  ):
      r"""Initializes a FeatureSelector instance.
  
      Args:
          indices: A LongTensor of feature indices.
          dim: The dimensional along which to index features.
      """
      super().__init__()
      self.register_buffer(
          "dim", dim if torch.is_tensor(dim) else torch.tensor(dim)
      )
      self.register_buffer(
          "indices",
          indices
          if torch.is_tensor(indices)
          else torch.tensor(indices),
      )
  
imports: from __future__ import annotations
  from abc import ABC, abstractmethod
  from typing import Any, Callable, Iterable, List, Optional, overload, Tuple, Union
  import torch
  from botorch.models.approximate_gp import SingleTaskVariationalGP
  from botorch.models.gpytorch import GPyTorchModel
  from botorch.models.model import Model, ModelList
  from botorch.models.transforms.input import InputTransform
  from botorch.models.transforms.outcome import OutcomeTransform
  from botorch.utils.dispatcher import Dispatcher
  from gpytorch.kernels import ScaleKernel
  from gpytorch.kernels.kernel import Kernel
  from torch import LongTensor, Tensor
  from torch.nn import Module, ModuleList
label_desc: Use image node_id 1 to create a new FeatureSelector object from inherited base classes: TensorTransform with example: obj = FeatureSelector(indices, dim)