官方文档上表示logs内存的内容为

on_epoch_end: logs include `acc` and `loss`, and
    optionally include `val_loss`
    (if validation is enabled in `fit`), and `val_acc`
    (if validation and accuracy monitoring are enabled).
on_batch_begin: logs include `size`,
    the number of samples in the current batch.
on_batch_end: logs include `loss`, and optionally `acc`
    (if accuracy monitoring is enabled).

即存字典关键字为acc,loss跟val_loss与val_acc。但是在执行回调使用这些关键字时会报找不到此关键字的错。debug发现,logs里存的关键词应该为accuracy,loss,val_loss,跟val_accuracy。

tensorflow2 keras.Callback logs

换成这些关键词就可以。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-15
  • 2022-02-14
  • 2022-12-23
  • 2021-08-27
  • 2021-09-09
  • 2021-05-24
猜你喜欢
  • 2021-10-24
  • 2021-04-18
  • 2021-05-16
  • 2021-08-10
  • 2021-04-09
  • 2021-08-13
  • 2021-04-25
相关资源
相似解决方案