concatenate()是否为我提供了一个具有两个输入节点的神经网络?

2024-10-05 15:23:20 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在使用Keras函数API在python中创建神经网络

这是我的密码:

dayin=Input(shape=(1,))
tempin=Input(shape=(1,))
merge=concatenate([dayin,tempin])
hidden=Dense(3)(merge)
output=Dense(2)(hidden)   

我知道我的代码创建了以下网络:

enter image description here

我希望建立以下前馈网络:

enter image description here

However I am unsure of whether my code is equivalent to the second diagram. i.e the two diagrams are equivalent.

如能澄清concatenate在这里的工作方式,我们将不胜感激


Tags: the函数网络apiinput神经网络mergehidden