class_docstr: Class that handles conversion of pytorch models to the MIL format.
  
  Models passed to the @TorchConverter go from:
  Loaded-Torch Model -> Internal Graph -> PyMIL
docstr: An utility function that sets the default outputs with inferred type fp32 to fp16.
  
  - If the inferred output dtype is fp32, and the user doesn't provide dtype, it defaults to fp16.
  - If the inferred output dtype is not fp32, nothing would change.
docstr_tok: ["An","utility","function","that","sets","the","default","outputs","with","inferred","type","fp32","to","fp16",".","-","If","the","inferred","output","dtype","is","fp32",",","and","the","user","does","n't","provide","dtype",",","it","defaults","to","fp16",".","-","If","the","inferred","output","dtype","is","not","fp32",",","nothing","would","change","."]
code: def _adjust_default_output_to_fp16(self, graph_outputs):
      """
      An utility function that sets the default outputs with inferred type fp32 to fp16.
  
      - If the inferred output dtype is fp32, and the user doesn't provide dtype, it defaults to fp16.
      - If the inferred output dtype is not fp32, nothing would change.
      """
      if self.outputs is None:
          self.outputs = []
          for val in graph_outputs:
              dtype = (
                  types.fp16 if val.dtype == types.fp32 else val.dtype
              )
              self.outputs.append(TensorType(dtype=dtype))
      else:
          for i, val in enumerate(self.outputs):
              if (
                  isinstance(val, TensorType)
                  and val.dtype is None
                  and graph_outputs[i].dtype == types.fp32
              ):
                  val.dtype = types.fp16
  
imports: from collections import OrderedDict
  from typing import List, Optional, Union
  import numpy
  import torch
  from torch.jit._script import RecursiveScriptModule
  from coremltools import _logger
  from coremltools._deps import _HAS_TORCH_EXPORT_API
  from coremltools.converters.mil._deployment_compatibility import AvailableTarget
  from coremltools.converters.mil.input_types import ImageType, InputType, TensorType
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil import Function, Placeholder, Program, types
  from coremltools.converters.mil.mil.types import is_float
  from coremltools.converters.mil.mil.var import Var
  from .._utils import get_output_names
  from .internal_graph import InternalTorchIRGraph, InternalTorchIRNode
  from .ops import TorchFrontend, convert_nodes
  from .quantization_ops import _dequantized_weight
  from .torch_op_registry import _TORCH_OPS_REGISTRY
  from .torchir_passes import flatten_graph_input_values, flatten_graph_output_values, generate_tensor_assignment_ops, remove_getattr_nodes, transform_inplace_ops
  from .torchscript_utils import torch_to_mil_types
label_desc: Use image node_id 3 for calling the TorchConverter obj's underlying member method code with example usage: obj._adjust_default_output_to_fp16(graph_outputs) without return types