mirror of
https://github.com/PaddlePaddle/PaddleClas.git
synced 2025-06-03 21:55:06 +08:00
Merge branch 'whole_chain' of https://github.com/RainFrost1/PaddleClas into whole_chain
This commit is contained in:
commit
a7b0b49726
@ -37,14 +37,17 @@ class RecPredictor(Predictor):
|
|||||||
self.postprocess = build_postprocess(config["RecPostProcess"])
|
self.postprocess = build_postprocess(config["RecPostProcess"])
|
||||||
self.benchmark = config["Global"].get("benchmark", False)
|
self.benchmark = config["Global"].get("benchmark", False)
|
||||||
|
|
||||||
|
if self.benchmark:
|
||||||
import auto_log
|
import auto_log
|
||||||
pid = os.getpid()
|
pid = os.getpid()
|
||||||
self.auto_logger = auto_log.AutoLogger(
|
self.auto_logger = auto_log.AutoLogger(
|
||||||
model_name=config["Global"].get("model_name", "rec"),
|
model_name=config["Global"].get("model_name", "rec"),
|
||||||
model_precision='fp16' if config["Global"]["use_fp16"] else 'fp32',
|
model_precision='fp16'
|
||||||
|
if config["Global"]["use_fp16"] else 'fp32',
|
||||||
batch_size=config["Global"].get("batch_size", 1),
|
batch_size=config["Global"].get("batch_size", 1),
|
||||||
data_shape=[3, 224, 224],
|
data_shape=[3, 224, 224],
|
||||||
save_path=config["Global"].get("save_log_path", "./auto_log.log"),
|
save_path=config["Global"].get("save_log_path",
|
||||||
|
"./auto_log.log"),
|
||||||
inference_config=self.config,
|
inference_config=self.config,
|
||||||
pids=pid,
|
pids=pid,
|
||||||
process_name=None,
|
process_name=None,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user