Tensorflow 我在调整神经网络参数时出错
我正在调整神经网络的参数 下面是我的代码Tensorflow 我在调整神经网络参数时出错,tensorflow,neural-network,grid-search,gridsearchcv,Tensorflow,Neural Network,Grid Search,Gridsearchcv,我正在调整神经网络的参数 下面是我的代码 layers = [[20], [40, 20], [45, 30, 15]] activations = ['sigmoid', 'relu'] neurons_params = [ 225,150,175] act_1_params=['tanh','sigmoid','relu'] dropout_ratio_params=[0.18,0.30,0.23] param_grid = dict(layers=layers, activ
layers = [[20], [40, 20], [45, 30, 15]]
activations = ['sigmoid', 'relu']
neurons_params = [ 225,150,175]
act_1_params=['tanh','sigmoid','relu']
dropout_ratio_params=[0.18,0.30,0.23]
param_grid = dict(layers=layers, activation=activations, batch_size = [128, 256], epochs=[30])
grid = GridSearchCV(estimator=model, param_grid=param_grid, n_jobs=1,verbose=2)
grid_result = grid.fit(X_train, y_train)
几分钟后,我犯了以下错误
运行时错误:无法克隆对象
因为构造函数不设置或修改参数层
你能添加尽可能多的代码吗?我想看看
激活的声明/初始化和层的声明/初始化。对不起@Shridharkulkarni这里是代码层=[[20],[40,20],[45,30,15]
激活=['sigmoid',relu']
参数网格=dict(层=层,激活=激活,批量大小=[128,256],epochs=[30])
grid=GridSearchCV(估计器=模型,参数网格=参数网格)