python – Deletes neurons at the output layer (Keras)

I use Keras to create a GAN to generate synthetic data. So, I want to use a predefined classifier model to be the discriminator (because I would not have to train the discriminator, only the generator).

The predefined model was made in keras and has 4 outlets in the last layer. Dense (4, activation = & # 39; softmax & # 39;) (A B C D). I want to generate synthetic data from class C. The discriminator model must only have one output (fake or true), so I have to change the last layer of the previous model so that it is not than output C. So, how can I do it in keras or maybe using Tensorflow in the backend?

I'm looking for something like this …

enter the description of the image here

model = load_model (& # 39; pre_treined_model.h5 & # 39;)
discriminator = model
discriminator.layers[-1] = "only C weight / output"