lukemelas / EfficientNet-PyTorch

A PyTorch implementation of EfficientNet
Apache License 2.0
7.92k stars 1.53k forks source link

from_pretrained() got an unexpected keyword argument 'weights_path' #328

Open onlinehuazai opened 2 years ago

onlinehuazai commented 2 years ago

from_pretrained() got an unexpected keyword argument 'weights_path'

EfficientNet.from_pretrained(model_name='efficientnet-b3', weights_path='efficientnet-b3-5fb5a3c3.pth')

kadirnar commented 2 years ago

Can you try like this?

model = EfficientNet.from_pretrained("efficientnet-b3", num_classes=2, weights_path="model.pth")