EfficientNet-PyTorch
EfficientNet-PyTorch copied to clipboard
KeyError: 'efficientnet-b8'
Hello!
When I tried:
model_name = 'efficientnet-b8'
print(EfficientNet.get_image_size(model_name))
Output: 672
Then
model = EfficientNet.from_pretrained(model_name)
I got error:
Traceback (most recent call last):
File "myfile.py", line 526, in
Can you help me pleas?
Pretrained model names for this package in model zoo are efficientnet-b0 to efficientnet-b7.
Hello!
When I tried:
model_name = 'efficientnet-b8' print(EfficientNet.get_image_size(model_name)) Output: 672Then
model = EfficientNet.from_pretrained(model_name)I got error:
Traceback (most recent call last): File "myfile.py", line 526, in model = EfficientNet.from_pretrained(model_name) File "myfolder/venv/lib64/python3.6/site-packages/efficientnet_pytorch/model.py", line 375, in from_pretrained load_pretrained_weights(model, model_name, weights_path=weights_path, load_fc=(num_classes == 1000), advprop=advprop) File "myfolder/venv/lib64/python3.6/site-packages/efficientnet_pytorch/utils.py", line 597, in load_pretrained_weights state_dict = model_zoo.load_url(url_map_[model_name]) KeyError: 'efficientnet-b8'
Can you help me pleas?
You can use b8 version pretrained weights only from advprop trained version, so:
model = EfficientNet.from_pretrained(model_name, adv_prop = True)