Skip to content

Commit 8fe0b15

Browse files
authored
[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 050b64a * Update expecting values.
1 parent 8fb1545 commit 8fe0b15

5 files changed

+1
-1
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

torchvision/ops/feature_pyramid_network.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def __init__(
8686
self.layer_blocks.append(layer_block_module)
8787

8888
# initialize parameters now to avoid modifying the initialization of top_blocks
89-
for m in self.children():
89+
for m in self.modules():
9090
if isinstance(m, nn.Conv2d):
9191
nn.init.kaiming_uniform_(m.weight, a=1)
9292
nn.init.constant_(m.bias, 0)

0 commit comments

Comments
 (0)