I think p = s should be in front of predictions of TCB.
for k, v in enumerate(sources[::-1]):
s = v
for i in range(3):
s = self.tcb0[(3-k)*3 + i](s)
#print(s.size())
if k != 0:
u = p
u = self.tcb1[3-k](u)
s += u
p = s
for i in range(3):
s = self.tcb2[(3-k)*3 + i](s)
tcb_source.append(s)
#print([x.size() for x in tcb_source])
tcb_source.reverse()
https://github.com/luuuyi/RefineDet.PyTorch/blob/0e4b24ce07245fcb8c48292326a731729cc5746a/models/refinedet.py#L115-L130
I think
p = s
should be in front of predictions of TCB.If I were wrong, please tell me, Thank you!