Skip to content

Commit

Permalink
initial zero offset and 0.5 mask
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlesShang committed Dec 10, 2018
1 parent bd685e4 commit 6431d0e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dcn_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,16 @@ def __init__(self,
nn.ReLU(inplace=True),
nn.Linear(self.deform_fc_dim, self.pooled_size * self.pooled_size * 2)
)
self.offset_fc[4].weight.data.zero_()
self.offset_fc[4].bias.data.zero_()
self.mask_fc = nn.Sequential(
nn.Linear(self.pooled_size * self.pooled_size * self.output_dim, self.deform_fc_dim),
nn.ReLU(inplace=True),
nn.Linear(self.deform_fc_dim, self.pooled_size * self.pooled_size * 1),
nn.Sigmoid()
)
self.mask_fc[2].weight.data.zero_()
self.mask_fc[2].bias.data.zero_()

def forward(self, data, rois):
if self.no_trans:
Expand Down

0 comments on commit 6431d0e

Please sign in to comment.