使用functional API创建模型,比使用keras.Sequential创建模型更灵活。functional API可以处理具有线性拓扑结构、共享层、甚至多个输入或输出的模型。
functional API
keras.Sequential