The AI Model work on jupyter lab but it doesn't work in Jetson Nano

Hi there, I am testing a new AI model for image classification on Jetson Nano (both 2GB and 4GB). The model works well on JupyterLab but returns NaN (or Infinitive) values when run directly in Jetson Nano.

In detail, I attempt to classify a bear picture by the AI model by using this source (994 Bytes)

Please help me. Thanks a lot. In addition, this code also works well on my Laptop running Windows OS with Python 3.6.9 and pytorch 0.7.0.