builtins.ValueError: Dimension 0 in both shapes must be equal,
but are 13 and 14 for 'concat' (op: 'ConcatV2') with input shapes:
[4,13,17,512], [4,14,18,512], [] and with computed
input tensors: input[2] = <0>.
正如您所见,concat2 = tf.concat([conv5_1, deconv5], axis = 0)
导致上述错误,我不知道如何解决它,有人帮忙吗?非常感谢!
答案 0 :(得分:0)
你的张量必须大小相同才能连接它们,这就是你得到它的原因。
有一些选项可以使张量相同,但要确保它们对您使用的数据有意义并且不会导致信息丢失:
使用tf.pad填充两个张量,使它们的大小相同。这是有风险的,因为当您连接它们时,某些堆叠值可能不代表相同的信息。