[Other] Add onnx_ort_runtime cpp/python demos (#565)

* add onnx_ort_runtime demo

* rm in requirements
This commit is contained in:
WJJ1995
2022-11-11 12:47:06 +08:00
committed by GitHub
parent 224c2cf1e8
commit 4bbfd977c7
9 changed files with 131 additions and 20 deletions

View File

@@ -25,6 +25,11 @@ int main(int argc, char* argv[]) {
runtime_option.SetModelPath(model_file, params_file, fd::ModelFormat::PADDLE);
runtime_option.UseOrtBackend();
runtime_option.SetCpuThreadNum(12);
// **** GPU ****
// To use GPU, use the following commented code
// runtime_option.UseGpu(0);
// init runtime
std::unique_ptr<fd::Runtime> runtime =
std::unique_ptr<fd::Runtime>(new fd::Runtime());