DeepLearningwithPython icon indicating copy to clipboard operation
DeepLearningwithPython copied to clipboard

3.5-classifying-movie-reviews.ipynb 執行時會遇到 KeyError: 'acc', 'val_acc'

Open jayjtao opened this issue 7 years ago • 2 comments

原書ch3 在 github 中的 3.5-classifying-movie-reviews.ipynb 中執行到:

import matplotlib.pyplot as plt acc = history.history['acc'] val_acc = history.history['val_acc']

時會遇到兩個: KeyError: 'acc' KeyError: 'val_acc'

需修改爲: acc = history.history['binary_accuracy'] val_acc = history.history['val_binary_accuracy']

jayjtao avatar Sep 28 '18 11:09 jayjtao

原作書中(和github)討論 以及與Ren和今天導讀Katy討論時都有間接提到:在"Building our network"的後半部分 跑model.compile()時 若避免選用最後一(第三)種方法的話 可以規避這個問題

jayjtao avatar Sep 29 '18 09:09 jayjtao

我照著指示修改 KeyError: 'binary_accuracy'

levidhc avatar May 26 '20 12:05 levidhc