docstr: Handles case when model inputs have dynamic shapes.
  For now TorchNeuron only supports dynamic shape for the
  batch dimension.
  
  Args:
      network_parameters (ModelParams): The model parameters.
  
  Returns:
      bool: True if the model has dynamic batch size, False otherwise.
docstr_tok: ["Handles","case","when","model","inputs","have","dynamic","shapes",".","For","now","TorchNeuron","only","supports","dynamic","shape","for","the","batch","dimension",".","Args",":","network_parameters","(","ModelParams",")",":","The","model","parameters",".","Returns",":","bool",":","True","if","the","model","has","dynamic","batch","size",",","False","otherwise","."]
code: def _check_dynamic_shape(network_parameters: ModelParams) -> bool:
      """Handles case when model inputs have dynamic shapes.
      For now TorchNeuron only supports dynamic shape for the
      batch dimension.
  
      Args:
          network_parameters (ModelParams): The model parameters.
  
      Returns:
          bool: True if the model has dynamic batch size, False otherwise.
      """
      if network_parameters.dynamic_info is None:
          return False
  
      for i, input_shape in enumerate(
          network_parameters.dynamic_info.inputs
      ):
          if len(input_shape) > 1 or (
              len(input_shape) == 1 and input_shape.get(0) is None
          ):
              raise ValueError(
                  f"TorchNeuronCompiler only supports dynamic shapes for "
                  f"batch dimension. Provided dynamic info for input {i} "
                  f"is: {input_shape}. Please use padding for the other "
                  f"dimensions."
              )
  
      return True
  
file_path: nebuly/optimization/nebullvm/nebullvm/operations/optimizations/compilers/torch_neuron.py
imports: from typing import List, Tuple
  from nebullvm.core.models import QuantizationType, ModelParams, DeviceType
  from nebullvm.operations.optimizations.compilers.base import Compiler
  from nebullvm.operations.optimizations.compilers.quantizations.utils import check_quantization
  from nebullvm.optional_modules.torch import torch, symbolic_trace
  from nebullvm.optional_modules.torch_neuron import torch_neuron
  from nebullvm.tools.data import DataManager
  from nebullvm.tools.transformations import MultiStageTransformation
label_desc: Use image node_id 1 for calling the TorchNeuronCompiler obj's underlying member method code with example usage: obj._check_dynamic_shape(network_parameters) and returns: True, False