Support disable logging information (#254)

* Support disable logging information

* Support disable logging information
This commit is contained in:
Jason
2022-09-20 15:44:10 +08:00
committed by GitHub
parent 9c150f0bfb
commit 74f1143aba
8 changed files with 39 additions and 17 deletions

View File

@@ -114,11 +114,11 @@ bool CheckModelFormat(const std::string& model_file,
Frontend GuessModelFormat(const std::string& model_file) {
if (model_file.size() > 8 &&
model_file.substr(model_file.size() - 8, 8) == ".pdmodel") {
FDLogger() << "Model Format: PaddlePaddle." << std::endl;
FDINFO << "Model Format: PaddlePaddle." << std::endl;
return Frontend::PADDLE;
} else if (model_file.size() > 5 &&
model_file.substr(model_file.size() - 5, 5) == ".onnx") {
FDLogger() << "Model Format: ONNX." << std::endl;
FDINFO << "Model Format: ONNX." << std::endl;
return Frontend::ONNX;
}