Demo for using Forward-Cpp in Linux
August 24, 2021 ยท View on GitHub
-
Build Forward-Cpp libraries refer to CMake-Build.
-
Copy
libfwd_torch.so(libfwd_tf.so,libfwd_keras.so,libfwd_onnx.so) andlibtrt_engine.sofrom thebuild/binto thelibsdirectory. -
Change the path of
TensorRT_ROOTin the scriptbuild.sh. If you need testtest_fwd_torch.cppor/andtest_fwd_tf.cppor/andtest_fwd_onnx.cpp, then you should specifiedENABLE_TORCH=ONor/andENABLE_TENSORFLOW=ONor/andENABLE_ONNX=ON, andLibTorchor/andLibTensorflow. -
Update the
model_pathandinput informationsin thetest_fwd_engine.cpp,test_fwd_tf.cppor/andtest_fwd_torch.cppor/andtest_fwd_onnx.cpp. -
run the script
build.shto build the demo project.
Notice: The name of INPUT in models can be viewed by model viewers, such as Netron.