title: get intermediate output from Keras/Tensorflow during prediction
body: <p>Let's say I load inception, and I need to extract the final descriptor just before classification.
  So given a simple code like this:</p>
  
  
  
  <pre class="lang-python prettyprint-override"><code>cnn = InceptionV3(weights='imagenet',
                include_top='False',
                pooling='avg')
  cnn.predict(x, batch_size=32, verbose=0)
  </code></pre>
  
  <p>How can I extract during prediction the last layer? </p>