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

Changing to num class to train to smaller than default #332

Open
lchunleo opened this issue Jul 28, 2022 · 0 comments
Open

Changing to num class to train to smaller than default #332

lchunleo opened this issue Jul 28, 2022 · 0 comments

Comments

@lchunleo
Copy link

lchunleo commented Jul 28, 2022

Using the pretrained model, encounter the error when i change the num of class to 3 from default 1000.
Or is it not meant to change class if using the pretrained model. Pls advise. thanks

referring to issue #152

model = EfficientNet.from_pretrained(args.arch, advprop=args.advprop, num_classes=3)

File "train.py", line 664, in accuracy
_, pred = output.topk(maxk, 1, True, True)
RuntimeError: selected index k out of range

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

1 participant