MATLAB: Getting this error: “Error using importKerasNetwork (line 93) Unable to import layers from file ‘model.h5’ because it contains no ‘model_config’ attribute.”
Deep Learning Toolboxerror using importkerasnetworkunable to import layers from file 'model.h5'
When Iam trying to import a custom model file 'model.h5' created using keras – model.save_weights()
Please help
Best Answer
It's a file that contains weights only, without the architecture. You need to create it using model.save(), not model.save_weights().
You can try importing the layers of your model using the importKerasLayers function to import the model layerwise into MATLAB. You can then edit the layers prior to the lstm layer to fix this.
Best Answer