Keras question

Datascientists out there help!!

How do you slice a layer in Keras

I have a NHWC layer with 2 channels I would like to slice so that I get NHWC/2

or in concrete example

I have a layer with N,40x80x2 how do I convert it to N,40x80x1

If possible please post a code snippet, Google isn’t helpful enough

Edit:
I have already tried
slicedout = slice(output,[0,0,0,0],[-1,-1,-1,1])

this works in Keras and code compiles. However this outputs a tensor. I am not sure how to convert it to a layer so that it can be used in the model

Answer:

slicedoutput = Lambda(lambda x: x[:,:,:,0])(output)