Reputation: 7351
I'm following the Tensorflow documentation for creating a simple neural network. One of the steps is
model.compile(optimizer='adam',
loss='sparse_categorical_crossentropy',
metrics=['accuracy'])
When I look at the documentation for the loss
parameter, it says
loss: String (name of objective function), objective function or tf.losses.Loss instance. See tf.losses. If the model has multiple outputs, you can use a different loss on each output by passing a dictionary or a list of losses. The loss value that will be minimized by the model will then be the sum of all individual losses.
Based on this documentation of the compile
function, how would I find a list of the strings and/or objective functions that I can pass for the loss
parameter? I found the tr.keras.losses
that has the objective functions by Googling, but it seems like there should be a link or mention of that in the documentation for Sequential.compile
. Am I missing something?
Upvotes: 0
Views: 30
Reputation: 2729
This code is Keras code, so you'll find the list of available loss functions in the Keras doc: https://keras.io/losses/
Upvotes: 1