I have a simple CNN model in tensorflow that takes in an image and predicts a 6 element label vector. The final layer of my mode is therefore Dense(6). Label[0] is supposed to be binary, while Label[1:6] is continuous valued. I therefore want to apply a sigmoid activation to the output layer on only the first node of the output, while leaving the other 5 outputs as is. How do I do this with tensorflow.keras? For simplicity, my model building code currently looks something like:
model = tf.keras.models.Sequential()
model.add(Reshape((image_size, image_size, 1), input_shape = (image_size, image_size))
model.add(Conv2D(8, **parameters))
model.add(BatchNormalization())
model.add(Activation('relu')
Model.add(MaxPool2D())
model.add(Flatten())
model.add(Dense(6))
How do I add to this to use sigmoid activation on the first index of the last layer?