更新时间:2023-12-02 14:56:46
predict_proba()
和predict_classes()
方法
The predict_proba()
and predict_classes()
methods are not well-defined for models created using functional API (i.e. keras.models.Model()
). That's because the models created using functional API may have multiple output layers each with different configurations. Therefore predicting probabilities in this case is not meaningful, even if your model outputs probabilities. The method you referred to, as well as predict_classes()
, is only defined for Sequential models (i.e. keras.models.Sequential()
).