Why is the accuracy for my Keras model always 0 when training?

后端 未结 4 890
粉色の甜心
粉色の甜心 2020-12-23 09:36

I\'m pretty new to keras I have built a simple network to try:

import numpy as np;

from keras.models import Sequential;
from keras.layers import Dense,Activ         


        
4条回答
  •  萌比男神i
    2020-12-23 10:20

    I would like to point out something that is very important and has been unfortunately neglected: mean_squared_error is not an invalid loss function for classification.

    The mathematical properties of cross_entropy in conjunction with the assumptions of mean_squared_error(both of which I will not expand upon in this comment) make the latter inappropriate or worse than the cross_entropy when it comes to training on classification problems.

提交回复
热议问题