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

add include_top==True to weights check when importing model #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JesperChristensen89
Copy link

When importing the model without the top, but with imagenet weights it fails. This is due to a mission condition check of include_top, which I have now fixed.

if weights not in {'imagenet', None}:
raise ValueError('The `weights` argument should be either '
'`None` (random initialization) or `imagenet` '
'(pre-training on ImageNet).')

if weights == 'imagenet' and classes != 1000:
if weights == 'imagenet' and classes != 1000 and include_top==True:
Copy link

@jaiprasadreddy jaiprasadreddy Apr 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rcmalli @JesperChristensen89
if weights == 'imagenet' and classes != 1000 and include_top:

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