…something not as hard as you may think — TL; DR If you are here for a quick solution that just works, then here it is in just 5 lines of code: model = tf.keras.models.Sequential([ tf.keras.layers.Dense(1, activation='sigmoid') ]) model.compile(loss='bce') model.fit(x_train, y_train, epochs=100) The long way Now, if you’re still with me it means that you don’t want just to copy + paste 5 lines…