0

Folks, I am using the tensorflow Mobilenet v1, and I retrained the last layer to output 4 classes, and it works. Now, I am trying to use the last fully connected layer (or last feature layter instead of the softmax layer) to then feed this into an LSTM network. I just don't know which is the last layer I need from mobilenet v1. Here is the model I am using: mobilenet_v1 Here is the code I used to see all layers, yet I don't know which one to pick:

import tensorflow as tf
graph = tf.Graph()
graph_def = tf.GraphDef()
model_file = '/home/root/model/output_graph.pb'
with open(model_file, "rb") as f:
    graph_def.ParseFromString(f.read())
with graph.as_default():
    tf.import_graph_def(graph_def)
print(graph.get_operations())
Pototo
  • 691
  • 1
  • 12
  • 27
  • You can visualize your graph in TensorBoard and lookup tensor name there. See [here](https://stackoverflow.com/a/43493222/3086290) for more details. – dm0_ Mar 28 '18 at 10:51
  • I did. I just did not know which tensor to use – Pototo Apr 05 '18 at 19:30

1 Answers1

0

It seems that the last Bottleneck layer right before the Software is what I need to use. That layer returns a 1x1001 matrix

Pototo
  • 691
  • 1
  • 12
  • 27