title: Tensorflow remove layers from pretrained model
body: <p>Is there a way to load a pretrained model in Tensorflow and remove the top layers in the network? I am looking at Tensorflow release r1.10</p>
  
  <p>The only documentation I could find is with <code>tf.keras.Sequential.pop</code>
  <a href="https://www.tensorflow.org/versions/r1.10/api_docs/python/tf/keras/Sequential#pop" rel="nofollow noreferrer">https://www.tensorflow.org/versions/r1.10/api_docs/python/tf/keras/Sequential#pop</a></p>
  
  <p>I want to manually prune a pretrained network by removing bunch of top convolution layers and add a custom fully convoluted layer.</p>
  
  <p>EDIT:</p>
  
  <p>The model is ssd_mobilenet_v1_coco downloaded from <a href="https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md" rel="nofollow noreferrer">Tensorflow Model Zoo</a>. I have access to both the frozen_inference_graph.pb model file and checkpoint file.</p>
  
  <p>I donot have access to the python code which is used to construct the model.</p>
  
  <p>Thanks.</p>