parameters: (self)
docstring: Removes the last layer in the model.
  
      Raises:
          TypeError: if there are no layers in the model.
docstring_summary: Removes the last layer in the model.
docstring_tokens: Removes the last layer in the model .
function: def pop(self):
      """Removes the last layer in the model.
  
      Raises:
          TypeError: if there are no layers in the model.
      """
      if not self.layers:
        raise TypeError('There are no layers in the model.')
  
      self.layers.pop()
      if not self.layers:
        self.outputs = []
        self.inbound_nodes = []
        self.outbound_nodes = []
      else:
        self.layers[-1].outbound_nodes = []
        self.outputs = [self.layers[-1].output]
        # update self.inbound_nodes
        self.inbound_nodes[0].output_tensors = self.outputs
        self.inbound_nodes[0].output_shapes = [K.int_shape(self.outputs[0])]
      self.built = False
function_tokens: def pop ( self ) : if not self . layers : raise TypeError ( 'There are no layers in the model.' ) self . layers . pop ( ) if not self . layers : self . outputs = [ ] self . inbound_nodes = [ ] self . outbound_nodes = [ ] else : self . layers [ - 1 ] . outbound_nodes = [ ] self . outputs = [ self . layers [ - 1 ] . output ] # update self.inbound_nodes self . inbound_nodes [ 0 ] . output_tensors = self . outputs self . inbound_nodes [ 0 ] . output_shapes = [ K . int_shape ( self . outputs [ 0 ] ) ] self . built = False