diff --git a/ppdet/modeling/heads/centernet_head.py b/ppdet/modeling/heads/centernet_head.py index aa3fbe2c318cdfe3ded000897675103b6e664dcd..49c7b0df10e444459f3f4e72768efe7841ccead0 100755 --- a/ppdet/modeling/heads/centernet_head.py +++ b/ppdet/modeling/heads/centernet_head.py @@ -98,7 +98,8 @@ class CenterNetHead(nn.Layer): stride=1, padding=0, bias=True)) - self.heatmap[2].conv.bias[:] = -2.19 + with paddle.no_grad(): + self.heatmap[2].conv.bias[:] = -2.19 self.size = nn.Sequential( ConvLayer( in_channels, head_planes, kernel_size=3, padding=1, bias=True),