0

I haved read this question,but didn't helps me. Keras Loss Function with Additional Dynamic Parameter

How can I do if I have two labels,means that I have y_pred1,y_true1 and y_pred2,y_true2。My custom loss function can be def huber_loss_mean_weighted(y_true1, y_pred1, y_true2,y_pred2,is_weights) ?

my loss function as flow ,how can I modify code?

model.compile(optimizer='adagrad',
              loss={'loss1': BinaryCrossentropy, 'loss2': BinaryCrossentropy, 'final': custom_error},loss_weights=[1, 1, 1])

model.fit(train_model_input,
          {'loss1': label1, 'loss2': label2, 'final': label_final} )
YUJI Z
  • 1

0 Answers0