【发布时间】:2019-04-03 15:25:00
【问题描述】:
我需要设计一个包含两个子网络的深度网络。
1- The first network: (sub_net_1)
input_1 size: 128x128x1
output_1 size: 512x512x1
from elsewhere:
input_2 size: 512x512x4
concatenate(output_1, input_2)
2- The second network: (sub_net_2)
input_3 size: 512x512x5
我需要将 output_1 与相同大小的 input_2 连接起来并馈送到网络
我知道在 tensorflow 中定义模型的简单方法是 模型(输入=输入,输出=x) 当我有两个不同大小的输入并且需要一起训练两个子网络时,如何为我的问题定义模型?
这里是网络的架构:https://imgur.com/OQFhlPW
【问题讨论】:
-
所以 sub_net_2 的输入应该是 (512, 512, 2) 的形状?
-
sub_net_2 的输入是 (512, 512, 5),即连接大小为 (512, 512, 1) 的 sub_net_1 的输出和大小为 (512, 512, 4) 的 input_2 的输出
-
tf.concat([sub_net_1, input_2], axis=2)
标签: python tensorflow model deep-learning