class_docstr: A class that adapts the PyTorch model inputs to exported ONNX model inputs format.
class_docstr_tok: ["A","class","that","adapts","the","PyTorch","model","inputs","to","exported","ONNX","model","inputs","format","."]
docstr: Converts the PyTorch model inputs to exported ONNX model inputs format.
  
  Args:
      model_args: The PyTorch model inputs.
      model: The PyTorch model.
      model_kwargs: The PyTorch model keyword inputs.
  Returns:
      A sequence of tensors converted from PyTorch model inputs.
code: def apply(
      self,
      *model_args,
      model: Optional[
          Union[torch.nn.Module, Callable, torch_export.ExportedProgram]
      ] = None,
      **model_kwargs,
  ) -> Sequence[Union[int, float, bool, str, "torch.Tensor", None]]:
      """Converts the PyTorch model inputs to exported ONNX model inputs format.
  
      Args:
          model_args: The PyTorch model inputs.
          model: The PyTorch model.
          model_kwargs: The PyTorch model keyword inputs.
      Returns:
          A sequence of tensors converted from PyTorch model inputs.
      """
      args: Sequence[Any] = model_args
      kwargs: Mapping[str, Any] = model_kwargs
      for step in self._steps:
          args, kwargs = step.apply(args, kwargs, model=model)
      assert not kwargs
      return args
  
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 InputAdapter obj's underlying member method code with example usage: obj.apply() and returns: args