class_docstr: Base class for torch backend outlier detection algorithms.
class_docstr_tok: ["Base","class","for","torch","backend","outlier","detection","algorithms","."]
docstr: Converts data from the frontend to the backend format.
  
  This is an interface method that ensures that the input of the chosen outlier detector backend is in the correct
  format.
  
  Parameters
  ----------
  x
      Data to convert.
docstr_tok: ["Converts","data","from","the","frontend","to","the","backend","format",".","This","is","an","interface","method","that","ensures","that","the","input","of","the","chosen","outlier","detector","backend","is","in","the","correct","format",".","Parameters","--","--","--","--","--","x","Data","to","convert","."]
code: def _to_backend_dtype(
      self, x: Union[List, np.ndarray]
  ) -> torch.Tensor:
      """Converts data from the frontend to the backend format.
  
      This is an interface method that ensures that the input of the chosen outlier detector backend is in the correct
      format.
  
      Parameters
      ----------
      x
          Data to convert.
      """
      return torch.as_tensor(x, dtype=torch.float32, device=self.device)
  
imports: from typing import List, Union, Optional, Dict
  from dataclasses import dataclass, fields
  from abc import ABC, abstractmethod
  import numpy
  import torch
  from alibi_detect.od.pytorch.ensemble import FitMixinTorch
  from alibi_detect.utils.pytorch.misc import get_device
  from alibi_detect.exceptions import ThresholdNotInferredError
  from alibi_detect.utils._types import TorchDeviceType
label_desc: Use image node_id 5 for calling the TorchOutlierDetector obj's underlying member method code with example usage: obj._to_backend_dtype(x) and returns: torch