From b648fdd1bbbc3f3ed445436d30d17fab383b0d42 Mon Sep 17 00:00:00 2001 From: CharlesShang Date: Wed, 5 Dec 2018 15:48:02 +0800 Subject: [PATCH] **add sigmoid after mask** --- dcn_v2.py | 1 + 1 file changed, 1 insertion(+) diff --git a/dcn_v2.py b/dcn_v2.py index 1194ffd..3fbd4dd 100644 --- a/dcn_v2.py +++ b/dcn_v2.py @@ -64,5 +64,6 @@ def forward(self, input): out = self.conv_offset_mask(input) o1, o2, mask = torch.chunk(out, 3, dim=1) offset = torch.cat((o1, o2), dim=1) + mask = torch.sigmoid(mask) func = DCNv2Function(self.stride, self.padding, self.dilation, self.deformable_groups) return func(input, offset, mask, self.weight, self.bias) \ No newline at end of file