fixed missing trt_backend option & remove un-need data layout check in Cast (#14)

* update .gitignore

* Added checking for cmake include dir

* fixed missing trt_backend option bug when init from trt

* remove un-need data layout and add pre-check for dtype

* changed RGB2BRG to BGR2RGB in ppcls model

* Update CMakeLists.txt
This commit is contained in:
DefTruth
2022-07-12 15:14:30 +08:00
committed by GitHub
parent 57697f3f18
commit a45f189b56
5 changed files with 38 additions and 15 deletions

View File

@@ -69,7 +69,8 @@ class TrtBackend : public BaseBackend {
bool InitFromOnnx(const std::string& model_file,
const TrtBackendOption& option = TrtBackendOption(),
bool from_memory_buffer = false);
bool InitFromTrt(const std::string& trt_engine_file);
bool InitFromTrt(const std::string& trt_engine_file,
const TrtBackendOption& option = TrtBackendOption());
bool Infer(std::vector<FDTensor>& inputs, std::vector<FDTensor>* outputs);