1
$\begingroup$

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?

$\endgroup$

1 Answer 1

3
$\begingroup$

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.

$\endgroup$
1
  • $\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, 2019 at 7:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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