Unverified Commit 8fe0b150 authored by Vasilis Vryniotis's avatar Vasilis Vryniotis Committed by GitHub
Browse files

[WIP] Fix initialisation bug on FeaturePyramidNetwork (#2954)

* Change children() to modules() to ensure init happens in all blocks.

* Update expected values of all detection models.

* Revert "Update expected values of all detection models."

This reverts commit 050b64ae

* Update expecting values.
parent 8fb15457
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
...@@ -86,7 +86,7 @@ class FeaturePyramidNetwork(nn.Module): ...@@ -86,7 +86,7 @@ class FeaturePyramidNetwork(nn.Module):
self.layer_blocks.append(layer_block_module) self.layer_blocks.append(layer_block_module)
# initialize parameters now to avoid modifying the initialization of top_blocks # initialize parameters now to avoid modifying the initialization of top_blocks
for m in self.children(): for m in self.modules():
if isinstance(m, nn.Conv2d): if isinstance(m, nn.Conv2d):
nn.init.kaiming_uniform_(m.weight, a=1) nn.init.kaiming_uniform_(m.weight, a=1)
nn.init.constant_(m.bias, 0) nn.init.constant_(m.bias, 0)
......
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