code: def get_layer(self, x, layer):
      
      # Return the symbolic representation for this layer.
      output = self.fprop(x)
      try:
        requested = output[layer]
      except KeyError:
        raise NoSuchLayerError()
      return requested
docs: Expose the hidden features of a model given a layer name.
      :param x: A symbolic representation of the network input
      :param layer: The name of the hidden layer to return features at.
      :return: A symbolic representation of the hidden features
      :raise: NoSuchLayerError if `layer` is not in the model.