我正在尝试学习Keras,并创建了一个简单的网络。要素数据为1、2、3、4、5,标签为7、9、11、13、15 -或斜率为2、截距为5的直线(Y =X*2+ 5)。我怀疑我缺少一个参数或设置,或者可能是模型上的函数调用。但我想不出那是什么。 这是我试图用Keras重现的tensorflow网络。这个网络在大约1300个时期收敛到正确的答案: #simple linear regression with tensorflow# This solves for a line
i
我使用scikit_learn.GridSearchCV为我的Keras神经网络网格搜索超参数(用于回归问题)。我的神经网络的输出是一个实值: #generate a model (createModel is a function which returns a keras.Sequential model)grid.fit(X, y)
print("Best: %f using %s" % (grid_result.best_score_, grid_result.best_params_)) 我不明白网格搜索结果<