How to port a pytorch model to jetson nano ?

I have a faster-rcnn.pytorch model. The repository address for this project is: I want to port this model to jetson nano. Is there a tutorial for reference? .

The jetson I bought has already installed python 3.6 and JetPack 4.2, so I didn’t build any wheels according to “Build Instructions”.
I downloaded the swap partition just by following “Build Instructions”.
I downloaded the “torch-1.1.0a0+b457266-cp36-cp36m-linux_aarch64.whl” offline, and then used “pip3 install .whl” to install pytorch1.1. I also used the following command to the torchvision:
$ git clone

cd vision sudo python install

But when I install scipy with “pip3 install scipy” it always fails.

Any help will be greatly appreciated.


The simplest way is to install pytorch on the Jetson Nano and run it directly:

Another approach is to convert the model into TensorRT.
It will increase the inference speed and also save the memory.
Here is a tutorial for doing so:


1 Like

The provided sample:

does not use GPU for training ! (my Platform is Jetson Nano)

Could you please provide a fix or solution for that, as Training on CPUs is really time consuming !

Here is a tutorial that uses PyTorch GPU for training:

If you prefer to modify the existing example above to use GPU for training, you need to call .cuda() on the PyTorch model and tensors.

Thanks ! It was resolved.

Training time dropped drastically and GPU utilization began.