计算参数数量
您刚刚创建了一个神经网络。现在,您将再创建一个新网络,并花点时间思考每一层的权重。Keras 的 Dense 层和 Sequential 模型已为您加载好,可以直接使用。
您将要创建的网络如下:
本练习是课程的一部分
Keras 深度学习入门
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Instantiate a new Sequential model
model = ____
# Add a Dense layer with five neurons and three inputs
model.add(____(____, input_shape=____, activation="relu"))
# Add a final Dense layer with one neuron and no activation
model.____
# Summarize your model
model.summary()