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?
Data Science Stack Exchange is a question and answer site for Data science professionals, Machine Learning specialists, and those interested in learning more about the field. It only takes a minute to sign up.
Sign up to join this communityI 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
.