Skip to content

Commit

Permalink
Merge pull request PaddlePaddle#1134 from PaddlePaddle/revert-1132-bu…
Browse files Browse the repository at this point in the history
…g_fix

Revert "glog does not need to be ebabled explictly"
  • Loading branch information
will-jl944 authored Sep 13, 2021
2 parents abb56d8 + 4c62cc0 commit 48cfb19
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions paddlex/cv/models/classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,11 @@ def default_optimizer(self, parameters, learning_rate, warmup_steps,
if warmup_steps > lr_decay_epochs[0] * num_steps_each_epoch:
logging.error(
"In function train(), parameters should satisfy: "
"warmup_steps <= lr_decay_epochs[0]*num_samples_in_train_dataset.",
"warmup_steps <= lr_decay_epochs[0]*num_samples_in_train_dataset",
exit=False)
logging.error(
"See this doc for more information: "
"https://github.com/PaddlePaddle/PaddleX/blob/develop/docs/parameters.md",
"https://github.com/PaddlePaddle/PaddleX/blob/release/2.0.0/docs/parameters.md",
exit=False)
logging.error(
"warmup_steps should less than {} or lr_decay_epochs[0] greater than {}, "
Expand Down
2 changes: 1 addition & 1 deletion paddlex/cv/models/detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def default_optimizer(self, parameters, learning_rate, warmup_steps,
exit=False)
logging.error(
"See this doc for more information: "
"https://github.com/PaddlePaddle/PaddleX/blob/develop/docs/parameters.md",
"https://github.com/PaddlePaddle/PaddleX/blob/release/2.0.0/docs/parameters.md",
exit=False)

scheduler = paddle.optimizer.lr.LinearWarmup(
Expand Down
4 changes: 3 additions & 1 deletion paddlex/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ def create_predictor(self,
)
pass

if not use_glog:
if use_glog:
config.enable_glog_info()
else:
config.disable_glog_info()
if memory_optimize:
config.enable_memory_optim()
Expand Down

0 comments on commit 48cfb19

Please sign in to comment.