异常:
AttributeError: 'ProgbarLogger' object has no attribute 'log_values'
原因:
For method fit() Keras should throw an exception when using validation_split and training set is ended up to be 0... Example: your last batch in epoch contains 1 sample and validation_split = 0.3 => training size = 0...
When training set size is 0 you will see this exception...
If you look at callbacks.py in keras, class ProgbarLogger, log_values member is created ONLY when batch starts... So if you don't have data in the batch it gets to on_epoch_end with log_values undefined...
本文详细解析了在使用Keras进行模型训练时遇到的AttributeError异常:'ProgbarLogger'对象没有属性'log_values'。当使用validation_split参数且训练集最终变为0时,这一错误尤为常见。文章深入探讨了这一问题的原因,并提供了可能的解决方案。
4594

被折叠的 条评论
为什么被折叠?



