mirror of
https://github.com/PaddlePaddle/PaddleOCR.git
synced 2025-06-03 21:53:39 +08:00
Support variable length input
This commit is contained in:
parent
444080a0cd
commit
ebe3e885c0
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user