Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jayjtao opened this issue Sep 28, 2018 · 2 comments
Labels
question Further information is requested

Comments

@jayjtao
Copy link
Collaborator

jayjtao commented Sep 28, 2018

原書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']

@Lhwei Lhwei added the question Further information is requested label Sep 28, 2018
@jayjtao
Copy link
Collaborator Author

jayjtao commented Sep 29, 2018

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

@levidhc
Copy link

levidhc commented May 26, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants