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

Cannot load NASNetLarge #9812

Closed
korytmar opened this issue Mar 31, 2018 · 4 comments
Closed

Cannot load NASNetLarge #9812

korytmar opened this issue Mar 31, 2018 · 4 comments

Comments

@korytmar
Copy link

My code is:

m = NASNetLarge(include_top=False,weights='imagenet',input_shape=(224,224,3))

But this line of code gives me this error:

ValueError: When settinginclude_top=True and loading imagenet weights, input_shape should be (331, 331, 3).

It only works with shape (331,331,3) but for larger inputs like (640,640,3) does not work again.

@gabrieldemarmiesse
Copy link
Contributor

This is normal. The NASNetLarge isn't made to accept different input sizes, like the VGG16 or VGG19 for example. The documentation states:

The default input size for the NASNetLarge model is 331x331 and for the NASNetMobile model is 224x224

@korytmar
Copy link
Author

korytmar commented Apr 3, 2018

I know that, but this default values are also for other models.

In docs NASNetLarge:

'It should have exactly 3 inputs channels, and width and height should be no smaller than 32. E.g. (200, 200, 3) would be one valid value.'

According to this, I think it should work or am I misunderstanding?

@gabrieldemarmiesse
Copy link
Contributor

I see what you mean. Sorry, I misread you the first time. I'm going to dig in, but I get the same error, and it's true that it makes no sense! Thanks for insisting!

@gabrieldemarmiesse
Copy link
Contributor

You are right, I did a check in more depths. A PR is going to be made. It'll take quite some time to make it in the stable release.

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

3 participants