Skip to content

Commit 64878ac

Browse files
authored
Merge pull request #271 from developer0hye/patch-1
modify variable name related to multi scale features
2 parents 7d9197e + ddda7b0 commit 64878ac

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

rtdetr_pytorch/src/zoo/rtdetr/hybrid_encoder.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -303,20 +303,20 @@ def forward(self, feats):
303303
# broadcasting and fusion
304304
inner_outs = [proj_feats[-1]]
305305
for idx in range(len(self.in_channels) - 1, 0, -1):
306-
feat_heigh = inner_outs[0]
306+
feat_high = inner_outs[0]
307307
feat_low = proj_feats[idx - 1]
308-
feat_heigh = self.lateral_convs[len(self.in_channels) - 1 - idx](feat_heigh)
309-
inner_outs[0] = feat_heigh
310-
upsample_feat = F.interpolate(feat_heigh, scale_factor=2., mode='nearest')
308+
feat_high = self.lateral_convs[len(self.in_channels) - 1 - idx](feat_high)
309+
inner_outs[0] = feat_high
310+
upsample_feat = F.interpolate(feat_high, scale_factor=2., mode='nearest')
311311
inner_out = self.fpn_blocks[len(self.in_channels)-1-idx](torch.concat([upsample_feat, feat_low], dim=1))
312312
inner_outs.insert(0, inner_out)
313313

314314
outs = [inner_outs[0]]
315315
for idx in range(len(self.in_channels) - 1):
316316
feat_low = outs[-1]
317-
feat_height = inner_outs[idx + 1]
317+
feat_high = inner_outs[idx + 1]
318318
downsample_feat = self.downsample_convs[idx](feat_low)
319-
out = self.pan_blocks[idx](torch.concat([downsample_feat, feat_height], dim=1))
319+
out = self.pan_blocks[idx](torch.concat([downsample_feat, feat_high], dim=1))
320320
outs.append(out)
321321

322322
return outs

0 commit comments

Comments
 (0)