```python # 导入必要的库 import numpy as np from keras import layers from keras.models import Sequential # 初始化模型 model=Sequential() # 添加输入层 model.add(layers.Dense(64,activation=‘relu',input_shape(32,))) # 添加隐藏层 model.add(layers.Dense(64,activation='relu')) # 添加输出层 model.add(layers.Dense(10,activation='softmax')) # 编译模型 model.compile(optimizer='rmsprop',loss='categorical_crossentropy',metrics=['accuracy']) # 训练模型 model.fit(data,labels,epochs=10,batch_size=32) # 预测结果 predictions=model.predict(x_test) ```