You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. I trained my dataset with your segnet implementation.
I used DePool2D custom layer when I trained my model.
Training was done smoothly, and it shows nice results.
However when I tried to reload the model it shows this error and I can't figure out what the problem is. Do you have any tips?
Traceback (most recent call last):
File "infer_test.py", line 188, in <module>
main()
File "infer_test.py", line 183, in main
join(model_root, "infer_results", splitext(snapshot)[0]))
File "infer_test.py", line 91, in infer_data
model = load_model(snapshot_path, custom_objects = {'DePool2D' : DePool2D(MaxPooling2D)})
File "/usr/lib/python3.6/site-packages/keras/models.py", line 239, in load_model
model = model_from_config(model_config, custom_objects=custom_objects)
File "/usr/lib/python3.6/site-packages/keras/models.py", line 313, in model_from_config
return layer_module.deserialize(config, custom_objects=custom_objects)
File "/usr/lib/python3.6/site-packages/keras/layers/__init__.py", line 54, in deserialize
printable_module_name='layer')
File "/usr/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 139, in deserialize_keras_object
list(custom_objects.items())))
File "/usr/lib/python3.6/site-packages/keras/engine/topology.py", line 2487, in from_config
process_layer(layer_data)
File "/usr/lib/python3.6/site-packages/keras/engine/topology.py", line 2473, in process_layer
custom_objects=custom_objects)
File "/usr/lib/python3.6/site-packages/keras/layers/__init__.py", line 54, in deserialize
printable_module_name='layer')
File "/usr/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 141, in deserialize_keras_object
return cls.from_config(config['config'])
File "/usr/lib/python3.6/site-packages/keras/engine/topology.py", line 1252, in from_config
return cls(**config)
TypeError: __init__() missing 1 required positional argument: 'pool2d_layer'
I load model with this codes
from build_segnet import DePool2D
...
model = load_model(snapshot_path, custom_objects = {'DePool2D' : DePool2D()})
The text was updated successfully, but these errors were encountered:
Hello. I trained my dataset with your segnet implementation.
I used DePool2D custom layer when I trained my model.
Training was done smoothly, and it shows nice results.
However when I tried to reload the model it shows this error and I can't figure out what the problem is. Do you have any tips?
I load model with this codes
The text was updated successfully, but these errors were encountered: