Support variable length input

This commit is contained in:
WenmuZhou 2022-08-15 09:00:07 +00:00
parent 444080a0cd
commit ebe3e885c0

View File

@ -304,9 +304,8 @@ class CSPPAN(nn.Layer):
for idx in range(len(self.in_channels) - 1, 0, -1):
feat_heigh = inner_outs[0]
feat_low = inputs[idx - 1]
upsample_feat = F.upsample(
feat_heigh, size=feat_low.shape[2:4], mode="nearest")
feat_heigh, size=paddle.shape(feat_low)[2:4], mode="nearest")
inner_out = self.top_down_blocks[len(self.in_channels) - 1 - idx](
paddle.concat([upsample_feat, feat_low], 1))