Keras Deep Learning library helps to develop the neural network models fast and easy. There are two ways to build a model in Keras — Sequential and Functional. Let me explain.
Photo by Kevin Ku on Unsplash
Sequential API allows you to create models layer-by-layer by stacking them. It is limited in that it does not allow you to create models that share layers or have multiple inputs or outputs.
Example Code:
from tensorflow.keras import Sequential, Model
from tensorflow.keras import layers
seq_model = Sequential()
seq_model.add(layers.Dense(4, input_shape=(10,2)))
seq_model.add(layers.Dense(4))
seq_model.add(layers.Dense(1))
seq_model.summary()
#keras #neural-networks #deep-learning #machine-learning #tensorflow