redouane-dziri / deep-music-classification

Classify music into genres using GLCM on mel-maps and CNNs
0 stars 0 forks source link

Saving model to .h5 with custom layer #14

Closed arnaudstiegler closed 4 years ago

arnaudstiegler commented 4 years ago

When running a simple model.save("my_model.h5"), we got the following error: RuntimeError: Unable to create link (name already exists)

Likely due to the fact that the model has a custom layer

arnaudstiegler commented 4 years ago

So, two small changes to make it work:

Reproducible code at playground/keras_custom_model_save.ipynb

redouane-dziri commented 4 years ago

COOOOL

arnaudstiegler commented 4 years ago

Closing the issue as I tested it on our model, and everything should work now!