I plan to create a neural network using Python, Keras, and TensorFlow. All the tutorials I have seen so far are concerned with image recognition. However, the goal of my program would be to take in 10+ inputs and calculate a binary output (true/false) instead.

Which loss function should I use for my task?


1 Answer 1


There are several loss functions that you can use for binary classification. For example, you could use the binary cross-entropy or the hinge loss functions.

See, for example, the tutorials Binary Classification Tutorial with the Keras Deep Learning Library (2016) and How to Choose Loss Functions When Training Deep Learning Neural Networks (2019) by Jason Brownlee. Have also a look at Keras documentation of its available loss functions.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .