多输出的Kreas损失和指标设置

时间:2018-08-02 03:56:46

标签: tensorflow model keras deep-learning metrics

我建立了一个具有两个输出的keras模型,'pred'和'ctc_loss',我希望'ctc_loss'是损失,而'pred'是度量模型时的度量。

model=Model(inputs=[X],outputs=['ctc_loss','pred'])
model.compile(loss={'ctc_loss':lambada y_true, y_pred:y_pred}, metrics={'pred':'accuracy'},optimizer = 'Adadelta')

该模型似乎无法评估指标,屏幕输出如下:

Epoch 6/10
10/10 [==============================] - 2s 150ms/step - loss: 342.6655 - ctc_loss_loss: 342.6655
Epoch 7/10
10/10 [==============================] - 2s 154ms/step - loss: 336.8232 - ctc_loss_loss: 336.8232
Epoch 8/10
10/10 [==============================] - 1s 147ms/step - loss: 345.7203 - ctc_loss_loss: 345.7203
Epoch 9/10
10/10 [==============================] - 2s 152ms/step - loss: 331.5218 - ctc_loss_loss: 331.5218
Epoch 10/10
10/10 [==============================] - 2s 152ms/step - loss: 334.4354 - ctc_loss_loss: 334.4354

我真的需要有人帮助我解决这个问题。谢谢!

0 个答案:

没有答案