wepe / MachineLearning

Basic Machine Learning and Deep Learning
5.07k stars 3.16k forks source link

keras手写体程序 #10

Open lxj0276 opened 8 years ago

lxj0276 commented 8 years ago

我运行的时候弹出这个错误信息,是怎么回事 Traceback (most recent call last): File "G:/MyCode/mmnist/keras_usage/cnn.py", line 85, in sgd = SGD(l2=0.1,lr=0.05, decay=1e-6, momentum=0.9, nesterov=True) File "D:\Anaconda2\lib\site-packages\keras-1.0.3-py2.7.egg\keras\optimizers.py", line 117, in init super(SGD, self).init(kwargs) File "D:\Anaconda2\lib\site-packages\keras-1.0.3-py2.7.egg\keras\optimizers.py", line 36, in init** 'passed to optimizer: ' + str(k)) Exception: Unexpected keyword argument passed to optimizer: l2

CorcovadoMing commented 8 years ago

@lxj0276

FYI http://keras.io/optimizers/ There are no l2 parameter for SGD in newer Keras version Maybe you should remove the l2 option in the function call

lxj0276 commented 8 years ago

@CorcovadoMing 好的,谢谢啦,看来新版接口有变化

younfor commented 8 years ago

l2那个参数去掉就可以了