Skip to content

Misleading error when trying to load models with underscore#64

Merged
lukemelas merged 1 commit intolukemelas:masterfrom
MichelML:patch-1
Aug 29, 2019
Merged

Misleading error when trying to load models with underscore#64
lukemelas merged 1 commit intolukemelas:masterfrom
MichelML:patch-1

Conversation

@MichelML
Copy link
Copy Markdown
Contributor

@MichelML MichelML commented Aug 16, 2019

Thanks for this repo @lukemelas .

Quick remark: I tried passing efficientnet_b0 but you get KeyError: 'efficientnet_b0' if you try to pass this.

Yet, if you pass a wrong model name such as efficientnet_0 you get the following message.

ValueError: model_name should be one of: efficientnet_b0, efficientnet_b1, efficientnet_b2, efficientnet_b3, efficientnet_b4, efficientnet_b5, efficientnet_b6, efficientnet_b7  

The error should tell you to provide a name with a dash instead.

ValueError: model_name should be one of: efficientnet-b0, efficientnet-b1, efficientnet-b2, efficientnet-b3, efficientnet-b4, efficientnet-b5, efficientnet-b6, efficientnet-b7   

I think the proposed small change fixes the issue.

Thanks for this repo!

Quick remark: I tried passing `efficientnet_b0` but you get `KeyError: 'efficientnet_b0'` if you try to pass this.   

Yet, if you pass a wrong model name such as  `efficientnet_0` you get the following message.

```
ValueError: model_name should be one of: efficientnet_b0, efficientnet_b1, efficientnet_b2, efficientnet_b3, efficientnet_b4, efficientnet_b5, efficientnet_b6, efficientnet_b7  
```   

The error should tell you to provide a name with  a dash  instead.

```
ValueError: model_name should be one of: efficientnet-b0, efficientnet-b1, efficientnet-b2, efficientnet-b3, efficientnet-b4, efficientnet-b5, efficientnet-b6, efficientnet-b7   
```     

I think the proposed small change fixes the issue.
@lukemelas
Copy link
Copy Markdown
Owner

Yes, I totally agree, thanks for the PR!

@lukemelas lukemelas merged commit de40cbf into lukemelas:master Aug 29, 2019
ulosc pushed a commit to ulosc/efficientnet that referenced this pull request Aug 18, 2021
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

Successfully merging this pull request may close these issues.

2 participants