Keras 是一个高级神经网络 API,可以运行在 TensorFlow、CNTK 或 Theano 后端之上。它被设计为易于使用且可扩展。
快速开始
安装
pip install keras
示例
以下是一个简单的神经网络模型示例:
from keras.models import Sequential
from keras.layers import Dense
model = Sequential()
model.add(Dense(12, input_dim=8, activation='relu'))
model.add(Dense(8, activation='relu'))
model.add(Dense(1, activation='sigmoid'))
model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])
资源
图片展示
深度学习网络结构
神经网络模型
希望这份文档能帮助您更好地了解和使用 Keras。如果您有任何疑问或需要进一步的帮助,请访问 Keras 中文社区。