Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search for both basic and bottleneck blocks (to fix "no known network structure detected" warning with ResNet-50 and other similar models) #2

Merged
merged 2 commits into from Jun 8, 2020

Conversation

Lissanro
Copy link
Contributor

@Lissanro Lissanro commented Jun 8, 2020

Currently when trying to use ResNet-50 (the same issue happens with usual
ResNeSt-50 and many other similar models) from timm library
https://github.com/rwightman/pytorch-image-models, I get the following warning:

"Manifold mixup: no known network structure detected, 126 modules will be used
for mixup"

This happens because ResNet-50 and higher do not have any BasicBlock and have
Bottlenecks instead. With this patch I get this message:

"Manifold mixup: Block structure detected, 16 modules will be used for mixup."

I get better error_rate than when 126 modules were used for mixup.

Currently when trying to use ResNet-50 (the same issue happens with usual
ResNeSt-50 and many other similar models) from timm library
https://github.com/rwightman/pytorch-image-models, I get the following warning:

"Manifold mixup: no known network structure detected, 126 modules will be used
for mixup"

This happens because ResNet-50 and higher do not have any BasicBlock and have
Bottlenecks instead. With this patch I get this message:

"Manifold mixup: Block structure detected, 16 modules will be used for mixup."

I get better error_rate than when 126 modules were used for mixup.
@nestordemeure
Copy link
Owner

I would prefer to not need regexp for that (mostly to improve readibility and reduce the number of dependencies that are loaded). Do you have the time to implement it with basic strings operations only (the is_block code can be used as an example, it should be fairly fast to write) ?

If you do not, I will merge it in its current state.

@Lissanro
Copy link
Contributor Author

Lissanro commented Jun 8, 2020

Sure, no problem. Done. I also updated documentation to mention new behavior.

@nestordemeure
Copy link
Owner

Perfect!

@nestordemeure nestordemeure merged commit 2c807aa into nestordemeure:master Jun 8, 2020
@Lissanro Lissanro deleted the bottleneck branch June 8, 2020 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants