class_docstr: A class that adapts the PyTorch model outputs to exported ONNX model outputs format.
class_docstr_tok: ["A","class","that","adapts","the","PyTorch","model","outputs","to","exported","ONNX","model","outputs","format","."]
docstr: Converts the PyTorch model outputs to exported ONNX model outputs format.
  
  Args:
      model_outputs: The PyTorch model outputs.
      model: The PyTorch model.
  
  Returns:
      PyTorch model outputs in exported ONNX model outputs format.
code: def apply(
      self,
      model_outputs: Any,
      model: Optional[
          Union[torch.nn.Module, Callable, torch_export.ExportedProgram]
      ] = None,
  ) -> Sequence[Union["torch.Tensor", int, float, bool, str]]:
      """Converts the PyTorch model outputs to exported ONNX model outputs format.
  
      Args:
          model_outputs: The PyTorch model outputs.
          model: The PyTorch model.
  
      Returns:
          PyTorch model outputs in exported ONNX model outputs format.
      """
      for step in self._steps:
          model_outputs = step.apply(model_outputs, model=model)
      return model_outputs
  
imports: from __future__ import annotations
  import inspect
  from typing import Any, Callable, List, Mapping, Optional, Protocol, runtime_checkable, Sequence, Tuple, Union
  import torch
  import torch.export
  from torch.onnx._internal import _beartype
  from torch.utils import _pytree
label_desc: Use image node_id 3 for calling the OutputAdapter obj's underlying member method code with example usage: obj.apply(model_outputs, model) and returns: model_outputs