EfficientNet-PyTorch icon indicating copy to clipboard operation
EfficientNet-PyTorch copied to clipboard

Changing to num class to train to smaller than default

Open lchunleo opened this issue 3 years ago • 0 comments

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

lchunleo avatar Jul 28 '22 03:07 lchunleo