Skip to content

Commit

Permalink
[Fix] complete training hooks. (open-mmlab#1236)
Browse files Browse the repository at this point in the history
* Fix: complete training hooks.

* not expose timer_hook

Co-authored-by: ly015 <liyining0712@gmail.com>
  • Loading branch information
bladrome and ly015 authored Mar 14, 2022
1 parent 2f9829e commit 663cfc8
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions mmpose/apis/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,14 @@ def train_model(model,
optimizer_config = cfg.optimizer_config

# register hooks
runner.register_training_hooks(cfg.lr_config, optimizer_config,
cfg.checkpoint_config, cfg.log_config,
cfg.get('momentum_config', None))
runner.register_training_hooks(
cfg.lr_config,
optimizer_config,
cfg.checkpoint_config,
cfg.log_config,
cfg.get('momentum_config', None),
custom_hooks_config=cfg.get('custom_hooks_config', None))

if distributed:
runner.register_hook(DistSamplerSeedHook())

Expand Down

0 comments on commit 663cfc8

Please sign in to comment.