code: def _forward_torch_random_input(
      torch_model, input_shapes, is_batch=False
  ):
      input_tensors = []
      for shape in input_shapes:
          if is_batch:
              tensor = torch.rand(1, *shape).float()
          else:
              tensor = torch.randn(shape)
              # tensor = torch.rand(*shape).float()
          input_tensors.append(tensor)
  
      print(input_tensors[0].shape)
      if len(input_tensors) == 1:
          result = torch_model.forward(input_tensors[0])
      else:
          result = torch_model.forward(input_tensors)
  
      print("result", result)
      if isinstance(result, list):
          # multi output
          output_shapes = []
          for tensor in result:
              shape = tensor.numpy().shape
              if is_batch:
                  shape = shape[1:]
              output_shapes.append(shape)
          return output_shapes
      else:
          # single output
          output_shape = result.numpy().shape
          if is_batch:
              return [output_shape[1:]]
          else:
              return [output_shape]
  
file_path: MMdnn/mmdnn/conversion/torch/torch_graph.py
imports: from mmdnn.conversion.common.DataStructure.graph import GraphNode, Graph
  from tensorflow.core.framework.node_def_pb2 import NodeDef
  from tensorflow.core.framework import attr_value_pb2
  import torch
label_desc: Use image node_id 4 for calling the TorchGraph obj's underlying member method code with example usage: obj._forward_torch_random_input(torch_model, input_shapes, is_batch) and returns: output_shapes, list, list