Remove the last layer in a model