In Week-4 of the transfer learning assignment, the last layer is “use a prediction layer with one neuron (as a binary classifier only needs one)”:
outputs = tf.keras.layers.Dense(1)(x)
Why can’t I use:
outputs = tf.keras.layers.Dense(1, activation='sigmoid')(x)
This will report an error saying that ‘linear’ doesn’t match with sigmoid. Why is that?