慕粉15329316420
2017-08-01 04:10
TypeError Traceback (most recent call last)<ipython-input-24-b78d43ed0331> in <module>() 22 #model.add(Dense(5,input_dim=4)) 23 sgd=SGD(lr=0.01,decay=1e-6,momentum=0.9,nesterov=True)---> 24 model.compile(optimizers=sgd,loss="categorical_crossentropy") 25 model.fit(train_data,labels_train,nb_epoch=200,batch_size=40) 26 print(model.predict_classes(test_data))
TypeError: compile() missing 1 required positional argument: 'optimizer'
model.compile(optimizers=sgd,loss="categorical_crossentropy") optimizers 没有s
Python数据分析-基础技术篇
93614 学习 · 277 问题
相似问题