diff --git a/docs/runtime/how_to_change_backend.md b/docs/runtime/how_to_change_backend.md index 6a90ed095..caa1062e1 100644 --- a/docs/runtime/how_to_change_backend.md +++ b/docs/runtime/how_to_change_backend.md @@ -9,7 +9,7 @@ FastDeploy中各视觉模型可支持多种后端,包括 所有模型切换后端方式均通过RuntimeOption进行切换, **Python** -``` +```python import fastdeploy as fd option = fd.RuntimeOption() @@ -26,14 +26,14 @@ option.use_ort_backend() # ONNX Runtime ``` **C++** -``` +```C++ fastdeploy::RuntimeOption option; -# 切换使用CPU/GPU +// 切换使用CPU/GPU option.UseCpu(); option.UseGpu(); -# 切换不同后端 +// 切换不同后端 option.UsePaddleBackend(); // Paddle Inference option.UseTrtBackend(); // TensorRT option.UseOpenVINOBackend(); // OpenVINO diff --git a/examples/vision/segmentation/paddleseg/README.md b/examples/vision/segmentation/paddleseg/README.md index 758a32ef1..8eb7c831d 100644 --- a/examples/vision/segmentation/paddleseg/README.md +++ b/examples/vision/segmentation/paddleseg/README.md @@ -2,7 +2,7 @@ ## 模型版本说明 -- [PaddleSeg Release/2.6](https://github.com/PaddlePaddle/PaddleSeg/tree/release/2.6) +- [PaddleSeg develop](https://github.com/PaddlePaddle/PaddleSeg/tree/develop) 目前FastDeploy支持如下模型的部署 diff --git a/examples/vision/segmentation/paddleseg/cpp/infer.cc b/examples/vision/segmentation/paddleseg/cpp/infer.cc index e4c11ce29..1632a5a52 100644 --- a/examples/vision/segmentation/paddleseg/cpp/infer.cc +++ b/examples/vision/segmentation/paddleseg/cpp/infer.cc @@ -83,8 +83,11 @@ void TrtInfer(const std::string& model_dir, const std::string& image_file) { auto option = fastdeploy::RuntimeOption(); option.UseGpu(); option.UseTrtBackend(); +<<<<<<< HEAD // option.SetTrtInputShape("x", {1, 3, 256, 256}, {1, 3, 1024, 1024}, // {1, 3, 2048, 2048}); +======= +>>>>>>> 4de832bc37b1f9c44e4956db94c2605cd34e021b auto model = fastdeploy::vision::segmentation::PaddleSegModel( model_file, params_file, config_file, option);