Skip to content

Use custom Evaluation Hook instead of EvalHook #7028

Answered by baibaidj
mdcaio asked this question in Q&A
Discussion options

You must be logged in to vote

I believe you have to modify the code in mmdet/apis/train.py to get what you want in this line

eval_hook = DistEvalHook if distributed else EvalHook

Change this snippet
eval_hook = DistEvalHook if distributed else EvalHook runner.register_hook( eval_hook(val_dataloader, **eval_cfg), priority='LOW')
to

eval_hook = MyDistEvalHook if distributed else MyEvalHook runner.register_hook( eval_hook(val_dataloader, **eval_cfg), priority='LOW')
So you may also have to implement MyDistEvalHook for distributed training.
You can refer to DistEvalHook to implement your custom counterpart, like you did with MyEvalHook.
Best.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mdcaio
Comment options

Answer selected by mdcaio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants