class_docstr: Base Model that can be used for all array-based
  NvidiaInferenceLearners.
class_docstr_tok: ["Base","Model","that","can","be","used","for","all","array-based","NvidiaInferenceLearners","."]
code: def _predict_array(
      self,
      cuda_input_arrays: List,
      input_shapes: Optional[List[Tuple[int, ...]]],
  ) -> Generator[np.ndarray, None, None]:
      if self.network_parameters.dynamic_info is None:
          cuda_output_arrays = [
              polygraphy.cuda.DeviceArray(
                  shape=output_size,
                  dtype=output_type.to_numpy_format(),
              )
              for output_size, output_type in zip(
                  self.network_parameters.output_sizes,
                  self.network_parameters.output_types,
              )
          ]
      else:
          dynamic_info = self.network_parameters.dynamic_info
          cuda_output_arrays = [
              polygraphy.cuda.DeviceArray(
                  shape=tuple(
                      x
                      if i not in dyn_out_axis.keys()
                      else dynamic_info.retrieve_output_dim(
                          input_shapes, j, i, x
                      )
                      for i, x in enumerate(output_size)
                  ),
                  dtype=output_type.to_numpy_format(),
              )
              for j, (
                  output_size,
                  output_type,
                  dyn_out_axis,
              ) in enumerate(
                  zip(
                      self.network_parameters.output_sizes,
                      self.network_parameters.output_types,
                      dynamic_info.outputs,
                  )
              )
          ]
      input_ptrs = (cuda_array.ptr for cuda_array in cuda_input_arrays)
      output_ptrs = (
          cuda_array.ptr for cuda_array in cuda_output_arrays
      )
      self._predict_tensors(input_ptrs, output_ptrs, input_shapes)
      for cuda_input_array in cuda_input_arrays:
          cuda_input_array.free()
      return (
          self._convert_to_array_and_free_memory(array)
          for array in cuda_output_arrays
      )
  
imports: import json
  import os
  from abc import ABC
  from pathlib import Path
  from tempfile import TemporaryDirectory
  from typing import Any, Union, Dict, Type, List, Tuple, Generator, Optional
  import numpy
  from loguru import logger
  from nebullvm.config import NVIDIA_FILENAMES
  from nebullvm.core.models import Device, DeviceType, ModelParams, DeepLearningFramework
  from nebullvm.operations.inference_learners.base import BaseInferenceLearner, LearnerMetadata, PytorchBaseInferenceLearner, TensorflowBaseInferenceLearner, NumpyBaseInferenceLearner
  from nebullvm.optional_modules.tensorflow import tensorflow
  from nebullvm.optional_modules.tensor_rt import tensorrt, polygraphy
  from nebullvm.optional_modules.torch import torch, ScriptModule
  from nebullvm.tools.data import DataManager
  from nebullvm.tools.transformations import MultiStageTransformation, VerifyContiguity
label_desc: Use image node_id 5 for calling the BaseArrayONNXTensorRTInferenceLearner obj's underlying member method code with example usage: obj._predict_array(cuda_input_arrays, input_shapes) and returns: unknown