Issues with importing keras model using "importKerasNetwork" function

조회 수: 1 (최근 30일)
Cyrus WaChong
Cyrus WaChong 2019년 7월 31일
댓글: Cyrus WaChong 2019년 8월 1일
I have been training my customized UNET model in keras and attempting to load it into MATLAB using an h5 file to run inference.
The issue is when I try to load the model into MATLAB (and yes, I am using model.save so that the h5 file holds both the model and weights) and try to run inference, I get this error:
Capture.PNG
I have tried loading in a single image, the entire volume (images of the retina) and nothing works.
The input dimensions match the dimensions of the input of my keras model.
What coulda this possibly be?
  댓글 수: 2
Gabija Marsalkaite
Gabija Marsalkaite 2019년 8월 1일
Hi Cyrus,
could you provide a link to similar (or your own) network? My initial guess would be that it has no output layer or some layers are not available (e.g. if relevant support package is not installed).
Cyrus WaChong
Cyrus WaChong 2019년 8월 1일
Hi Gabija,
Turns out I was using the wrong command to run inference. Since it was a DAG network, I had to use the "predict" command.
Cheers,
Cyrus

댓글을 달려면 로그인하십시오.

답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by