Output layer

In this example we're predicting a binary target. As before, we can use a dense layer with a single sigmoid neuron to accomplish this binary classification task:

output = Dense(1, activation='sigmoid', name='sigmoid')(lstm1)

Get Deep Learning Quick Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.