classifier.add中的TypeError:('Keyword参数不被理解:','init') [英] TypeError: ('Keyword argument not understood:', 'init') in classifier.add

查看:94
本文介绍了classifier.add中的TypeError:('Keyword参数不被理解:','init')的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在输入层中遇到以下错误.我确实有4的输入数据和1的输出.另外,我有一个列字符串.数据来自CSV文件.任何帮助表示赞赏

I am just having the following error in the input layer. I do have input data of 4 and the output of one. Additionally, I have one column string. The data is from a CSV file. Any help appreciated

classifier.add(Dense(1, init = 'uniform', activation = 'relu', input_shape = (4,)))

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

推荐答案

Keras 1.2不支持单独的内核/偏差初始化程序,各层仅采用单个init参数,例如Dense(10,init ="normal",激活="relu").将其更改为Dense(10,activation ="relu")

Keras 1.2 doesn't support separate kernel/bias initializers, layers only take a single init parameter, eg, Dense(10, init="normal", activation="relu"). change it to Dense(10, activation="relu")

这篇关于classifier.add中的TypeError:('Keyword参数不被理解:','init')的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆