Skip to content

A tutorial and sample code for running a pytorch nerual network using c++ on Nvidia jetson nano computer

License

Notifications You must be signed in to change notification settings

FSC-Lab/fsc_torch_jetson_cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fsc_torch_jetson_cpp

Maintenance

A tutorial and sample code for running a pytorch nerual network using c++ on Nvidia jetson nano computer.

Author

Dr. Longhao Qian

How to use

  • Read this tutorial about how to correctly install pytorch c++ lib on jetson nano.

  • Run the python/verify_pytorch.py to verify whether pytorch c++ lib function correctly.

  • run to train a simple neural network and save the trained network to .pt weights file.

  • run to compile the src/pytorchTest/pytorch_load_test.cpp and src/pytorchTest/pytorch_load_test_gpu.cpp to get the execution files.

  • run to build_release/pytorchTest/pytorch_load_test_gpu and build_release/pytorchTest/pytorch_load_test and observe the results.

CMake settings

  • read this tutorial about cmake commands to incooperate pytorch lib in compilation.

Tensor definition in c++

  • read this tutorial about tensor definition in c++

CPU/GPU execution

  • read this tutorial about CPU/GPU nerual network execution.

Libtorch documentation

  • using libtorch to load pytorch model is in this link.

About

A tutorial and sample code for running a pytorch nerual network using c++ on Nvidia jetson nano computer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published