class_docstr: Output of the outlier detector.
class_docstr_tok: ["Output","of","the","outlier","detector","."]
code: def to_frontend_dtype(self):
      result = {}
      for f in fields(self):
          value = getattr(self, f.name)
          if isinstance(value, torch.Tensor):
              value = value.cpu().detach().numpy()
          if isinstance(value, np.ndarray) and value.ndim == 0:
              value = value.item()
          result[f.name] = value
      return result
  
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 1 for calling the TorchOutlierDetectorOutput obj's underlying member method code with example usage: obj.to_frontend_dtype() and returns: result