class_docstr: Model optimized on CPU using DeepSparse. DeepSparse is an engine
  accelerating sparse computations on CPUs.
  
  Attributes:
      network_parameters (ModelParams): The model parameters as batch
              size, input and output sizes.
      onnx_path (str or Path): Path to the onnx model.
      input_names (List[str]): Input names used when the onnx model
          was produced.
      output_names (List[str]): Output names used when the onnx model
          was produced.
class_docstr_tok: ["Model","optimized","on","CPU","using","DeepSparse",".","DeepSparse","is","an","engine","accelerating","sparse","computations","on","CPUs",".","Attributes",":","network_parameters","(","ModelParams",")",":","The","model","parameters","as","batch","size",",","input","and","output","sizes",".","onnx_path","(","str","or","Path",")",":","Path","to","the","onnx","model",".","input_names","(","List","[","str","]",")",":","Input","names","used","when","the","onnx","model","was","produced",".","output_names","(","List","[","str","]",")",":","Output","names","used","when","the","onnx","model","was","produced","."]
docstr: Predict on the input tensors.
  
  Note that the input tensors must be on the same batch. If a sequence
  of tensors is given when the model is expecting a single input tensor
  (with batch size >= 1) an error is raised.
  
  Args:
      input_tensors (Tuple[Tensor]): Input tensors belonging to the same
          batch. The tensors are expected having dimensions
          (batch_size, dim1, dim2, ...).
  
  Returns:
      Tuple[Tensor]: Output tensors. Note that the output tensors does
          not correspond to the prediction on the input tensors with a
          1 to 1 mapping. In fact the output tensors are produced as the
          multiple-output of the model given a (multi-) tensor input.
docstr_tok: ["Predict","on","the","input","tensors",".","Note","that","the","input","tensors","must","be","on","the","same","batch",".","If","a","sequence","of","tensors","is","given","when","the","model","is","expecting","a","single","input","tensor","(","with","batch","size",">","=","1",")","an","error","is","raised",".","Args",":","input_tensors","(","Tuple","[","Tensor","]",")",":","Input","tensors","belonging","to","the","same","batch",".","The","tensors","are","expected","having","dimensions","(","batch_size",",","dim1",",","dim2",",","...",")",".","Returns",":","Tuple","[","Tensor","]",":","Output","tensors",".","Note","that","the","output","tensors","does","not","correspond","to","the","prediction","on","the","input","tensors","with","a","1","to","1","mapping",".","In","fact","the","output","tensors","are","produced","as","the","multiple-output","of","the","model","given","a","(","multi-",")","tensor","input","."]
code: def run(self, *input_tensors: torch.Tensor) -> Tuple[torch.Tensor]:
      """Predict on the input tensors.
  
      Note that the input tensors must be on the same batch. If a sequence
      of tensors is given when the model is expecting a single input tensor
      (with batch size >= 1) an error is raised.
  
      Args:
          input_tensors (Tuple[Tensor]): Input tensors belonging to the same
              batch. The tensors are expected having dimensions
              (batch_size, dim1, dim2, ...).
  
      Returns:
          Tuple[Tensor]: Output tensors. Note that the output tensors does
              not correspond to the prediction on the input tensors with a
              1 to 1 mapping. In fact the output tensors are produced as the
              multiple-output of the model given a (multi-) tensor input.
      """
      input_arrays = (
          input_tensor.cpu().detach().numpy()
          for input_tensor in input_tensors
      )
      outputs = self._predict_arrays(input_arrays)
      return tuple(torch.from_numpy(output) for output in outputs)
  
imports: import os
  import shutil
  from abc import ABC
  from pathlib import Path
  from typing import Union, List, Generator, Tuple, Dict, Type
  import numpy
  from loguru import logger
  from nebullvm.config import ONNX_FILENAMES
  from nebullvm.core.models import Device, ModelParams, DeepLearningFramework
  from nebullvm.operations.inference_learners.base import BaseInferenceLearner, LearnerMetadata, PytorchBaseInferenceLearner
  from nebullvm.optional_modules.deepsparse import cpu, compile_model
  from nebullvm.optional_modules.torch import torch
  from nebullvm.tools.transformations import MultiStageTransformation
label_desc: Use image node_id 1 for calling the PytorchDeepSparseInferenceLearner obj's underlying member method code with example usage: obj.run() and returns: tuple