- Check if the input arguments passed are correct.
- Verify the location of “model_next.h5” file.
- Verify the activation and layer used in the model, this function only supports most common used layer, Kindly cross verify them from the following link.
Error when importing trained Keras network
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Cyrus WaChong
el 25 de Sept. de 2019
Comentada: Cyrus WaChong
el 1 de Oct. de 2019
I'm currently training a U-Net network in keras to segment images. The original run through with 2000 image and 5 epochs imports as an "h5" file and can run inference, but when I re-import into keras and retrain for another 3 epochs, when I try to import the h5 file back into MATLAB, I get the following error:
Error using importKerasNetwork (line 94)
Expected input to be positive.
Error in test (line 1)
LFUNET = importKerasNetwork('model_next.h5');
What exactly does this error mean? I'm not very sure what is means that my h5 file is negative. These files are much larger than
0 comentarios
Respuesta aceptada
Shashank Gupta
el 1 de Oct. de 2019
Editada: Shashank Gupta
el 1 de Oct. de 2019
Hi Cyrus,
This is an MException error, generally occur when an inappropriate identifier has been passed to the function. Following things may help
You can go through the importKerasNetwork.m script to know more about the function and error handling.
I hope this helps.
Más respuestas (0)
Ver también
Categorías
Más información sobre Image Data Workflows 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!