Unverified Commit 7282f554 authored by Francisco Massa's avatar Francisco Massa Committed by GitHub

Fix weight init in FastRCNNPredictor (#60)

parent 3308cd92
...@@ -17,10 +17,10 @@ class FastRCNNPredictor(nn.Module): ...@@ -17,10 +17,10 @@ class FastRCNNPredictor(nn.Module):
self.bbox_pred = nn.Linear(num_inputs, num_classes * 4) self.bbox_pred = nn.Linear(num_inputs, num_classes * 4)
nn.init.normal_(self.cls_score.weight, mean=0, std=0.01) nn.init.normal_(self.cls_score.weight, mean=0, std=0.01)
nn.init.constant_(self.cls_score.weight, 0) nn.init.constant_(self.cls_score.bias, 0)
nn.init.normal_(self.bbox_pred.weight, mean=0, std=0.001) nn.init.normal_(self.bbox_pred.weight, mean=0, std=0.001)
nn.init.constant_(self.bbox_pred.weight, 0) nn.init.constant_(self.bbox_pred.bias, 0)
def forward(self, x): def forward(self, x):
x = self.avgpool(x) x = self.avgpool(x)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment