-
Notifications
You must be signed in to change notification settings - Fork 225
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
Import failed #193
Comments
Did you try saving weights instead of model?
…On Thu, Mar 15, 2018 at 2:35 PM, dberma15 ***@***.***> wrote:
Hi,
I'm having trouble implementing the model. The problem is I'm running it
on a VM without an internet connection, so everything either has to be
presaved to a file or loaded from code.
If I try to run the code specifying a backbone:
backbone=keras_rcnn.I models.backbone.VGG16
model = keras_rcnn.models.RCNN((img_size,img_size,3),['cell'],
backbone=backbone)
I have problems loading VGG16.
If I save run that code on my computer, save it to
"untrained_RCNN_VGG16.h5", and try to load that with
from keras_rcnn.models import RCNN
from keras_rcnn.layers import Anchor
model=load_model("untrained_RCNN_VGG16.h5",{'RCNN':keras_rcnn.models.RCNN,'Anchor':Anchor})
I get the error
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/home/bermads1/anaconda3/lib/python3.6/site-packages/keras/models.py", line 240, in load_model
> model = model_from_config(model_config, custom_objects=custom_objects)
> File "/home/bermads1/anaconda3/lib/python3.6/site-packages/keras/models.py", line 314, in model_from_config
> return layer_module.deserialize(config, custom_objects=custom_objects)
> File "/home/bermads1/anaconda3/lib/python3.6/site-packages/keras/layers/__init__.py", line 55, in deserialize
> printable_module_name='layer')
> File "/home/bermads1/anaconda3/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 140, in deserialize_keras_object
> list(custom_objects.items())))
> File "/home/bermads1/anaconda3/lib/python3.6/site-packages/keras/engine/topology.py", line 2490, in from_config
> process_layer(layer_data)
> File "/home/bermads1/anaconda3/lib/python3.6/site-packages/keras/engine/topology.py", line 2476, in process_layer
> custom_objects=custom_objects)
> File "/home/bermads1/anaconda3/lib/python3.6/site-packages/keras/layers/__init__.py", line 55, in deserialize
> printable_module_name='layer')
> File "/home/bermads1/anaconda3/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 142, in deserialize_keras_object
> return cls.from_config(config['config'])
> File "/home/bermads1/anaconda3/lib/python3.6/site-packages/keras/engine/topology.py", line 1253, in from_config
> return cls(**config)
> File "/home/bermads1/anaconda3/lib/python3.6/site-packages/keras_rcnn/layers/object_detection/_anchor.py", line 52, in __init__
> super(Anchor, self).__init__(**kwargs)
> File "/home/bermads1/anaconda3/lib/python3.6/site-packages/keras/engine/topology.py", line 280, in __init__
> raise TypeError('Keyword argument not understood:', kwarg)
> TypeError: ('Keyword argument not understood:', 'allowed_border')
>
I'm not sure how to proceed, as there are no functions or classes
"allowed_border". Can anyone help?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#193>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AJJbgihzvi6G2wBA-ZmlzIyHNcj5Kbl-ks5terRlgaJpZM4SsrP5>
.
|
Shouldn't saving the model save the weights? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I'm having trouble implementing the model. The problem is I'm running it on a VM without an internet connection, so everything either has to be presaved to a file or loaded from code.
If I try to run the code specifying a backbone:
I have problems loading VGG16.
If I save run that code on my computer, save it to "untrained_RCNN_VGG16.h5", and try to load that with
I get the error
I'm not sure how to proceed, as there are no functions or classes "allowed_border". Can anyone help?
The text was updated successfully, but these errors were encountered: