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

CIFAR100 has different architecture from official implementation #13

Closed
zijian-hu opened this issue Sep 9, 2020 · 1 comment
Closed

Comments

@zijian-hu
Copy link

In your implementation, WRN28-10 is used which has about 36M parameters.
Your model definition:

FixMatch-pytorch/train.py

Lines 165 to 169 in 9044f2e

elif args.dataset == 'cifar100':
args.num_classes = 100
if args.arch == 'wideresnet':
args.model_depth = 28
args.model_width = 10

I used the following code to get the number of parameters

wrn = build_wideresnet(depth=28, widen_factor=10, dropout=0, num_classes=100)

print(f"# params: {sum(p.numel() for p in wrn.parameters()):,}")

which gives the following output:
Annotation 2020-09-09 005826

In the official TensorFlow implementation, a WRN with about 23M parameters is used for CIFAR100 (see below image).
fixmatch num params - Copy

Notes

The CLI args for the official code can be found in this issue.

@zijian-hu zijian-hu changed the title Architecture used for CIFAR100 is different from official implementation CIFAR100 has different architecture from official implementation Sep 9, 2020
@kekmodel
Copy link
Owner

kekmodel commented Nov 9, 2020

fixed! thanks!

@kekmodel kekmodel closed this as completed Nov 9, 2020
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

No branches or pull requests

2 participants