Jetson nano GPU is not working?

When I run the code and I also put the function to GPU, but it seems like GPU is not working (GR3D_FREQ 0%).
Is there anything I miss?GPU driver?
I use Jetson nano 2GB

RAM 1911/1972MB (lfb 2x256kB) SWAP 2252/7130MB (cached 17MB) IRAM 0/252kB(lfb 252kB) CPU [30%@1479,28%@1479,17%@1479,54%@1479] EMC_FREQ 0%@1600 GR3D_FREQ 0%@921 VIC_FREQ 0%@192 APE 25 PLL@24C CPU@25C PMIC@100C GPU@26C AO@34.5C thermal@25.75C

What’s the code you ran?
What’s the JetPack version on your Jetson Nano?

Package: nvidia-jetpack
Version: 4.5-b129
Architecture: arm64

It will stuck on out = net(inp)['out'] and got failed.
the code I run :

from torchvision import models
fcn = models.segmentation.fcn_resnet101(pretrained=True).eval()
fcn.to("cuda")
import numpy as np
# Define the helper function
def decode_segmap(image, nc=21):
  
  label_colors = np.array([(0, 0, 0),  # 0=background
               # 1=aeroplane, 2=bicycle, 3=bird, 4=boat, 5=bottle
               (128, 0, 0), (0, 128, 0), (128, 128, 0), (0, 0, 128), (128, 0, 128),
               # 6=bus, 7=car, 8=cat, 9=chair, 10=cow
               (0, 128, 128), (128, 128, 128), (64, 0, 0), (192, 0, 0), (64, 128, 0),
               # 11=dining table, 12=dog, 13=horse, 14=motorbike, 15=person
               (192, 128, 0), (64, 0, 128), (192, 0, 128), (64, 128, 128), (192, 128, 128),
               # 16=potted plant, 17=sheep, 18=sofa, 19=train, 20=tv/monitor
               (0, 64, 0), (128, 64, 0), (0, 192, 0), (128, 192, 0), (0, 64, 128)])

  r = np.zeros_like(image).astype(np.uint8)
  g = np.zeros_like(image).astype(np.uint8)
  b = np.zeros_like(image).astype(np.uint8)
  
  for l in range(0, nc):
    idx = image == l
    r[idx] = label_colors[l, 0]
    g[idx] = label_colors[l, 1]
    b[idx] = label_colors[l, 2]
    
  rgb = np.stack([r, g, b], axis=2)
  return rgb
from PIL import Image
import matplotlib.pyplot as plt
import torchvision.transforms as T
def segment(net, path, show_orig=True, dev='cuda'):
  img = Image.open(path)
  if show_orig: plt.imshow(img); plt.axis('off'); plt.show()
  # Comment the Resize and CenterCrop for better inference results
  trf = T.Compose([T.Resize(640), 
                   #T.CenterCrop(224), 
                   T.ToTensor(), 
                   T.Normalize(mean = [0.485, 0.456, 0.406], 
                               std = [0.229, 0.224, 0.225])])
  inp = trf(img).unsqueeze(0).to(dev)
  print(1) 
  net= net.to(dev)
  print(2)
  out = net(inp)['out']
  print(3)
  om = torch.argmax(out.squeeze(), dim=0).detach().cpu().numpy()
  print(4)
  rgb = decode_segmap(om)
  print(5)
  plt.imshow(rgb); plt.axis('off'); plt.show()
!wget -nv https://www.learnopencv.com/wp-content/uploads/2021/01/horse-segmentation.jpeg -O horse.png
segment(fcn, './horse.png')

when I run the code.
It seems like GPU is not working

Hi,

Which PyTorch package do you install?
It’s recommended to use our prebuilt package that has Jetson’s GPU support:

Thanks.