-
Notifications
You must be signed in to change notification settings - Fork 148
Open
Description
您好,模型的编译阶段代码:model.compile(loss="categorical_crossentropy", optimizer=adam, metrics=["accuracy"]) 。
损失函数选取了"categorical_crossentropy",而评价函数选取了"accuracy",个人查看了一下keras中文文档,觉得accuracy处也应该选取“categorical_accuracy''。

因为,文章中用了与"categorical_crossentropy"配合使用的“to_categorical''函数,将每个类别对应的真值label转化成了如上图所示 :其中向量只有一个索引为1,其余索引为0,对应一个类别。而网络预测结果最后以softmax作为输出。所以我认为应该用“categorical_accuracy'',请问您是怎么考虑的关于“accuracy‘’,现在keras中文文档没有它的官方说明......也是比较神奇
Metadata
Metadata
Assignees
Labels
No labels