Skip to content

Commit

Permalink
🐛 Fix cfg.model.roi_head.bbox.num_classes on train.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sjleo1 committed Nov 28, 2022
1 parent e75ad1a commit 4a879fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mmdetection/tools/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ def main():
logger = get_root_logger(log_file=log_file, log_level=cfg.log_level)

# set num_classes
cfg.model.roi_head.bbox_head.num_classes = len(cfg.classes)
for bbox_head in cfg.model.roi_head.bbox_head:
bbox_head.num_classes = len(cfg.classes)

# init the meta dict to record some important information such as
# environment info and seed, which will be logged
Expand Down

0 comments on commit 4a879fe

Please sign in to comment.