tensorflow2 投票模型集成(ValueError: The estimator KerasClassifier should be a classifie)(已解决)

学习的代码在

                       https://github.com/czy36mengfei/tensorflow2_tutorials_chinese/blob/master/021-MLP/002-MLP2.ipynb

运用到常见的技巧, 如: 权重初始化, 激活函数, 优化器, 批规范化, dropout,模型集成
 


用 tenserflow2.1 会报错 ValueError: The estimator KerasClassifier should be a classifier.
 

既然 estimator 需要是 classifier 类型,那只要设置为 classifier 类型就行了 
 

  即:           model1._estimator_type = "classifier"

具体如图:

猜你喜欢

转载自blog.csdn.net/dare_kz/article/details/105990884
今日推荐