Skip to content Skip to sidebar Skip to footer

Cnn Loss With Multiple Outputs?

I have the following model def get_model(): epochs = 100 learning_rate = 0.1 decay_rate = learning_rate / epochs inp = keras.Input(shape=(64, 101, 1), name='inputs') x = layers.Co

Solution 1:

following the Tensorflow Documentation...

from the loss argument:

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

remember also that you can also weight the loss contributions of different model outputs

from the loss_weights argument:

The loss value that will be minimized by the model will then be the weighted sum of all individual losses, weighted by the loss_weights coefficients

Post a Comment for "Cnn Loss With Multiple Outputs?"