code: def to_numpy(tensor):
      return (
          tensor.detach().cpu().numpy()
          if tensor.requires_grad
          else tensor.cpu().numpy()
      )
  
file_path: deep-learning-for-image-processing/deploying_service/deploying_pytorch/convert_tensorrt/convert_resnet34/convert_pytorch2onnx.py
imports: import torch
  import torch.onnx
  import onnx
  import onnxruntime
  import numpy
  from torchvision.models import resnet34
label_desc: Use image node_id 1 for calling a global function with example usage: to_numpy(tensor) and returns: unknown