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

load model? #29

Open
whmrtm opened this issue Oct 3, 2017 · 4 comments
Open

load model? #29

whmrtm opened this issue Oct 3, 2017 · 4 comments

Comments

@whmrtm
Copy link

whmrtm commented Oct 3, 2017

Hi @0x00b1, when I was trying to load the saved resnet18, got the error: "ResNet18' object has no attribute 'load' . Can we have the load function implemented?

@hgaiser
Copy link
Contributor

hgaiser commented Oct 3, 2017

load_model is implemented in keras.models. Try:

model = keras.models.load_model(model_path)

@NicolettaK
Copy link

When I reload a saved model with keras.models.load_model(model_path)
I got a the following error:

TypeError: ('Keyword argument not understood:', 'freeze')

how can I overcome it?

@nhannguyen2709
Copy link

@NicolettaK You got that error since keras_resnet library uses a custom BatchNormalization layer

The following code works for me:
model = load_model(model_path, custom_objects={'BatchNormalization': keras_resnet.layers.BatchNormalization})

@AirFishWang
Copy link

@NicolettaK You got that error since keras_resnet library uses a custom BatchNormalization layer

The following code works for me:
model = load_model(model_path, custom_objects={'BatchNormalization': keras_resnet.layers.BatchNormalization})

@nhannguyen2709 it not works for me, I don't know why

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

5 participants