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
Broken MDense.get_config crash model loading in Python.
Estimated cause is wrong attribute name.
With hacking, it can be fixed.
Phenomena
I tried to resume training from saved checkpoint using keras.models.load_model.
When load the model state from checkpoint, MDense loading raise below error.
Traceback (most recent call last):
File "training_tf2/train_lpcnet.py", line 112, in <module>
model = keras.models.load_model(args.resume_model, custom_objects=custom_objs)
...
File "/usr/local/lib/python3.7/dist-packages/keras/engine/base_layer.py", line 796, in from_config
return cls(**config)
TypeError: __init__() missing 1 required positional argument: 'outputs'
Estimated cause
The error says that default .from_config crash with missing positional argument outputs of MDense.__init__.
As error suggested, during serialization, outputs is not exported, instead, units is exported.
Summary
Broken
MDense.get_config
crash model loading in Python.Estimated cause is wrong attribute name.
With hacking, it can be fixed.
Phenomena
I tried to resume training from saved checkpoint using
keras.models.load_model
.When load the model state from checkpoint, MDense loading raise below error.
Estimated cause
The error says that default
.from_config
crash with missing positional argumentoutputs
ofMDense.__init__
.As error suggested, during serialization,
outputs
is not exported, instead,units
is exported.LPCNet/training_tf2/mdense.py
Lines 81 to 83 in 2159b4f
This will cause above error.
How to Fix
I patch like below, and the bug disappear.
I do not know backward compatibility policy of this repository, so this is just an idea.
Thanks for your great LPCNet library, I love this! I am happy if this help this repo.
The text was updated successfully, but these errors were encountered: