MSE均方误差

mean_squared_error / mse  均方误差,常用的目标函数,公式为((y_pred-y_true)**2).mean()
model = Sequential()    
model.add(Dense(64, init='uniform', input_dim=10))    
model.add(Activation('tanh'))    
model.add(Activation('softmax'))    
     
sgd = SGD(lr=0.1, decay=1e-6, momentum=0.9, nesterov=True)    
model.compile(loss='mean_squared_error', optimizer=sgd)   

猜你喜欢

转载自blog.csdn.net/weixin_38145317/article/details/79467583