How to fix TypeError:

How to fix TypeError: ,第1张

Issue : TypeError: ('Keyword argument not understood:', 'init')

 

Solution:

there are kernel_initializer and  bias_initializer if you want to initialize any one of them.

 

# create model
model = Sequential()
model.add(Dense(12, input_dim=8, kernel_initializer='uniform',activation='relu'))
model.add(Dense(8, bias_initializer='uniform',activation='relu'))
model.add(Dense(1, kernel_initializer='random_uniform',activation='sigmoid'))

Reason :

From the docs there is no init argument in the Keras Dense layer, there are kernel_initializer and  bias_initializer if you want to initialize any one of them.

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/916110.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-16
下一篇 2022-05-16

发表评论

登录后才能评论

评论列表(0条)

保存