z小白
z小白
keras使用‘accuracy’作为metrics时,默认调用的是[metrics.py](https://github.com/keras-team/keras/blob/c2e36f369b411ad1d0a40ac096fe35f73b9dffd3/keras/metrics.py)里的categorical_accuracy函数,如下 `def categorical_accuracy(y_true, y_pred): '''Calculates the mean accuracy rate across all predictions for multiclass classification problems. ''' return K.mean(K.equal(K.argmax(y_true, axis=-1), K.argmax(y_pred, axis=-1)))` 我认为计算方法是没有问题。
默认调用categorical_accuracy,可以参考[training.py](https://github.com/fchollet/keras/blob/d8b226f26b35348d934edb1213061993e7e5a1fa/keras/engine/training.py#L651)