title: Print layer outputs in Keras during training
body: <p>I am new to Keras. How can I print the outputs of a layer, both intermediate or final, during the training phase?</p>
  
  <p>I am trying to debug my neural network and wanted to know how the layers behave during training. To do so I am trying to exact input and output of a layer during training, for every step.</p>
  
  <p>The FAQ (<a href="https://keras.io/getting-started/faq/#how-can-i-obtain-the-output-of-an-intermediate-layer" rel="noreferrer">https://keras.io/getting-started/faq/#how-can-i-obtain-the-output-of-an-intermediate-layer</a>) has a method to extract output of intermediate layer for building another model but that is not what I want. I don't need to use the intermediate layer output as input to other layer, I just need to print their values out and perhaps graph/chart/visualize it.</p>
  
  <p>I am using Keras 2.1.4</p>