code: def get_layers_output(self, dataset):
          
          layers_out = []
  
          with self.tf_graph.as_default():
              with tf.Session() as self.tf_session:
                  self.tf_saver.restore(self.tf_session, self.model_path)
                  for l in self.layer_nodes:
                      layers_out.append(l.eval({self.input_data: dataset,
                                                self.keep_prob: 1}))
  
          if layers_out == []:
              raise Exception("This method is not implemented for this model")
          else:
              return layers_out
docs: Get output from each layer of the network.
  
          :param dataset: input data
          :return: list of np array, element i is the output of layer i