Skip to content

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

@jayjtao

Description

@jayjtao

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions