-1
与标题相同,我想使用Scikit Learn类构建一个名为MLPRegressor的神经网络模型。安装和编译后,代码将无法运行,给返回值:不能导入名称MLPRegressor无法导入名称MLPRegressor
from sklearn.neural_network import MLPRegressor
mlp = MLPRegressor(hidden_layer_sizes=(5,), activation='relu', verbose=True, learning_rate_init=1, learning_rate='adaptive', max_iter=500,)
mlp.fit(X,y)
mlp.score(X,y)
print mlp.coefs_
print mlp.n_layers_
print mlp.n_outputs_
print mlp.out_activation_
更新:该代码在Windows 10中运行这个一定规格...
Scikit -learn:0.17.1
Scikit-neuralnetwork:0.7
的Python 2.7
这是非常不清楚的。你怎么输入它?什么是scikit的版本?哪个平台? –