Tensorflow:如何处理多个输入

Tensorflow: How handle multiple inputs

我想在 tensorflow 中创建一个卷积神经网络,它将图像作为第一个卷积层的输入,并通过网络传播来自它们的数据。在最后一个池化层变平的地方,我想在那里添加一些额外的输入或直接添加到全连接层。

注意:对于训练数据的每个输入图像,存在一组额外的图像唯一的数值。

有人可以提供一些关于如何在 tensorflow 中实现这个的信息吗?

您可以只声明一个输入变量并在任何您喜欢的地方使用它。不一定要在第一层。

#A,B are placeholders let's say
last_layer = forward(A) # forward function computes to the last layer
output = transform(last_layer,B)

如果您在问题中添加特定代码。我可以提供更多帮助。