I trained my own dataset using MaskRCNN. My trained file is in .h5 file format. Now I want to know/read input node names and output node names.

How can I read?


I assume that you have the Keras .h5 file ready. Now, we need to load the model from that file using,

model = keras.models.load_model( 'model.h5' )

model represents the Keras model. Now, model.input will correspond to the input tensor.

input = model.input
output = model.output

Also, you get the output in a similar way. The input and output tensors will have their names. This can be observed by printing the tensor using Python's print.

| improve this answer | |
  • $\begingroup$ Thanks for your comment. Your answer is ok for my question, but. I saved only weight not model. However, now I understood my problem. $\endgroup$ – Learning Jul 15 '19 at 7:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.