Skip to content

Instantly share code, notes, and snippets.

@marrabld
Last active September 26, 2018 06:06
Show Gist options
  • Save marrabld/a58e571e4456d2ef3b59beb3fc6051b1 to your computer and use it in GitHub Desktop.
Save marrabld/a58e571e4456d2ef3b59beb3fc6051b1 to your computer and use it in GitHub Desktop.
Choosing the right cost function
Problem type Last-layer activation Loss function
Binary classification sigmoid binary_crossentropy
Multiclass, single-label classification softmax categorical_crossentropy
Multiclass, multilabel classification sigmoid binary_crossentropy
Regression to arbitrary values None mse
Regression to values between 0 and 1 sigmoid mse or binary_crossentropy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment