Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Bugfix: incorrect BACKBONE_OUT_CHANNELS due to duplicate RESNET keys in yaml files #545

Merged
merged 1 commit into from Mar 9, 2019
Merged

Bugfix: incorrect BACKBONE_OUT_CHANNELS due to duplicate RESNET keys in yaml files #545

merged 1 commit into from Mar 9, 2019

Conversation

bernhardschaefer
Copy link
Contributor

In some YAML files the RESNETS key appears twice.

yacs uses pyyaml.safe_load(), which considers only the last key occurrence.

In the adapted configs, this means that instead of the specified 256 channels the models were actually trained with the default 1024 channels.

from maskrcnn_benchmark.config import cfg
print(cfg.MODEL.RESNETS.BACKBONE_OUT_CHANNELS)  # -> 1024

cfg.merge_from_file("../configs/quick_schedules/e2e_mask_rcnn_X_101_32x8d_FPN_quick.yaml")

print(cfg.MODEL.RESNETS.BACKBONE_OUT_CHANNELS) # -> still 1024 instead of 256

Imho yacs should throw an error in case of duplicate keys, as requested in an open bug report in pyyaml: yaml/pyyaml#165
I will create an issue within yacs to point to that issue.

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Mar 8, 2019
Copy link
Contributor

@fmassa fmassa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the bugfix! This was due to a bad rebase on my side :-/

@fmassa fmassa merged commit 90080e6 into facebookresearch:master Mar 9, 2019
Lyears pushed a commit to Lyears/maskrcnn-benchmark that referenced this pull request Jun 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants