Load pretrained keras network using deep learning toolbox

5 visualizaciones (últimos 30 días)
nor kadosh
nor kadosh el 10 de Ag. de 2021
Respondida: Yongjian Feng el 11 de Ag. de 2021
Hi,
I'm trying to load pre-trained neural networks by using a deep learning toolbox.
I saved my python model in numbers ways such as:
  • model.save("model")
  • model.save("model.h5")
  • model.save_weights("model.h5")
  • etc.
But none of them working when trying to load them into MATLAB workspace.
Input:
model = importKerasLayers("model.h5")
Error:
Error using nnet.internal.cnn.keras.ParsedKerasModel (line 26)
Assertion failed.
Error using nnet.internal.cnn.keras.ParsedKerasLayers (line 14)
KM = nnet.internal.cnn.keras.ParsedKerasModel(ModelConfig, Training);
Error in importKerasLayers (line 102)
Layers = nnet.internal.cnn.keras.ParsedKerasLayers(modefilie, varargin{:});

Respuestas (1)

Yongjian Feng
Yongjian Feng el 11 de Ag. de 2021
Not sure if they are compatible. Why not loading it from python code? Call python from matlab.

Categorías

Más información sobre Call Python from MATLAB en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by