From 8a3376b8f20829926a0d3dde6f88f97e2ea90646 Mon Sep 17 00:00:00 2001 From: JYChen Date: Fri, 22 Oct 2021 10:59:42 +0800 Subject: [PATCH] fix trt inference error in lite_hrnet (#4355) --- ppdet/modeling/backbones/lite_hrnet.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ppdet/modeling/backbones/lite_hrnet.py b/ppdet/modeling/backbones/lite_hrnet.py index fbf1dfe21..da98be3a4 100644 --- a/ppdet/modeling/backbones/lite_hrnet.py +++ b/ppdet/modeling/backbones/lite_hrnet.py @@ -651,7 +651,9 @@ class LiteHRNetModule(nn.Layer): for i in range(len(self.fuse_layers)): y = out[0] if i == 0 else self.fuse_layers[i][0](out[0]) for j in range(self.num_branches): - if i == j: + if j == 0: + y += y + elif i == j: y += out[j] else: y += self.fuse_layers[i][j](out[j]) -- GitLab