Open styap94 opened 6 years ago
According to this: https://stackoverflow.com/questions/40028175/how-do-you-get-the-name-of-the-tensorflow-output-nodes-in-a-keras-model
You can output the node names like this:
[print(n.name) for n in tf.get_default_graph().as_graph_def().node]
Though it's easier to simply give each layer a name, and then use the names you give it.
Edit:
For instance, if you're using the lstm model, you could change model.add(Dense(self.nb_classes, activation='softmax'))
to model.add(Dense(self.nb_classes, activation='softmax' name='output'))
and then I believe you can simply use output
as your output name.
im converting hdf5 to pb, and later want to use the model for android development, i want to know the input and output node name, where can i find it?