We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Feature Pyramid Network code bug
https://github.com/pytorch/vision/blob/c2e8a00885e68ae1200eb6440f540e181d9125de/torchvision/ops/feature_pyramid_network.py#L60

this line does not work, I think it should be modified as self.modules() instead of self.children()

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `torchvision/ops/feature_pyramid_network.py`
Content:
```
1 from collections import OrderedDict
2 
3 import torch
4 import torch.nn.functional as F
5 from torch import nn, Tensor
6 
7 from torch.jit.annotations import Tuple, List, Dict, Optional
8 
9 
10 class ExtraFPNBlock(nn.Module):
11     """
12     Base class for the extra block in the FPN.
13 
14     Arguments:
15         results (List[Tensor]): the result of the FPN
16         x (List[Tensor]): the original feature maps
17         names (List[str]): the names for each one of the
18             original feature maps
19 
20     Returns:
21         results (List[Tensor]): the extended set of results
22             of the FPN
23         names (List[str]): the extended set of names for the results
24     """
25     def forward(
26         self,
27         results: List[Tensor],
28         x: List[Tensor],
29         names: List[str],
30     ) -> Tuple[List[Tensor], List[str]]:
31         pass
32 
33 
34 class FeaturePyramidNetwork(nn.Module):
35     """
36     Module that adds a FPN from on top of a set of feature maps. This is based on
37     `"Feature Pyramid Network for Object Detection" <https://arxiv.org/abs/1612.03144>`_.
38 
39     The feature maps are currently supposed to be in increasing depth
40     order.
41 
42     The input to the model is expected to be an OrderedDict[Tensor], containing
43     the feature maps on top of which the FPN will be added.
44 
45     Arguments:
46         in_channels_list (list[int]): number of channels for each feature map that
47             is passed to the module
48         out_channels (int): number of channels of the FPN representation
49         extra_blocks (ExtraFPNBlock or None): if provided, extra operations will
50             be performed. It is expected to take the fpn features, the original
51             features and the names of the original features as input, and returns
52             a new list of feature maps and their corresponding names
53 
54     Examples::
55 
56         >>> m = torchvision.ops.FeaturePyramidNetwork([10, 20, 30], 5)
57         >>> # get some dummy data
58         >>> x = OrderedDict()
59         >>> x['feat0'] = torch.rand(1, 10, 64, 64)
60         >>> x['feat2'] = torch.rand(1, 20, 16, 16)
61         >>> x['feat3'] = torch.rand(1, 30, 8, 8)
62         >>> # compute the FPN on top of x
63         >>> output = m(x)
64         >>> print([(k, v.shape) for k, v in output.items()])
65         >>> # returns
66         >>>   [('feat0', torch.Size([1, 5, 64, 64])),
67         >>>    ('feat2', torch.Size([1, 5, 16, 16])),
68         >>>    ('feat3', torch.Size([1, 5, 8, 8]))]
69 
70     """
71     def __init__(
72         self,
73         in_channels_list: List[int],
74         out_channels: int,
75         extra_blocks: Optional[ExtraFPNBlock] = None,
76     ):
77         super(FeaturePyramidNetwork, self).__init__()
78         self.inner_blocks = nn.ModuleList()
79         self.layer_blocks = nn.ModuleList()
80         for in_channels in in_channels_list:
81             if in_channels == 0:
82                 raise ValueError("in_channels=0 is currently not supported")
83             inner_block_module = nn.Conv2d(in_channels, out_channels, 1)
84             layer_block_module = nn.Conv2d(out_channels, out_channels, 3, padding=1)
85             self.inner_blocks.append(inner_block_module)
86             self.layer_blocks.append(layer_block_module)
87 
88         # initialize parameters now to avoid modifying the initialization of top_blocks
89         for m in self.children():
90             if isinstance(m, nn.Conv2d):
91                 nn.init.kaiming_uniform_(m.weight, a=1)
92                 nn.init.constant_(m.bias, 0)
93 
94         if extra_blocks is not None:
95             assert isinstance(extra_blocks, ExtraFPNBlock)
96         self.extra_blocks = extra_blocks
97 
98     def get_result_from_inner_blocks(self, x: Tensor, idx: int) -> Tensor:
99         """
100         This is equivalent to self.inner_blocks[idx](x),
101         but torchscript doesn't support this yet
102         """
103         num_blocks = 0
104         for m in self.inner_blocks:
105             num_blocks += 1
106         if idx < 0:
107             idx += num_blocks
108         i = 0
109         out = x
110         for module in self.inner_blocks:
111             if i == idx:
112                 out = module(x)
113             i += 1
114         return out
115 
116     def get_result_from_layer_blocks(self, x: Tensor, idx: int) -> Tensor:
117         """
118         This is equivalent to self.layer_blocks[idx](x),
119         but torchscript doesn't support this yet
120         """
121         num_blocks = 0
122         for m in self.layer_blocks:
123             num_blocks += 1
124         if idx < 0:
125             idx += num_blocks
126         i = 0
127         out = x
128         for module in self.layer_blocks:
129             if i == idx:
130                 out = module(x)
131             i += 1
132         return out
133 
134     def forward(self, x: Dict[str, Tensor]) -> Dict[str, Tensor]:
135         """
136         Computes the FPN for a set of feature maps.
137 
138         Arguments:
139             x (OrderedDict[Tensor]): feature maps for each feature level.
140 
141         Returns:
142             results (OrderedDict[Tensor]): feature maps after FPN layers.
143                 They are ordered from highest resolution first.
144         """
145         # unpack OrderedDict into two lists for easier handling
146         names = list(x.keys())
147         x = list(x.values())
148 
149         last_inner = self.get_result_from_inner_blocks(x[-1], -1)
150         results = []
151         results.append(self.get_result_from_layer_blocks(last_inner, -1))
152 
153         for idx in range(len(x) - 2, -1, -1):
154             inner_lateral = self.get_result_from_inner_blocks(x[idx], idx)
155             feat_shape = inner_lateral.shape[-2:]
156             inner_top_down = F.interpolate(last_inner, size=feat_shape, mode="nearest")
157             last_inner = inner_lateral + inner_top_down
158             results.insert(0, self.get_result_from_layer_blocks(last_inner, idx))
159 
160         if self.extra_blocks is not None:
161             results, names = self.extra_blocks(results, x, names)
162 
163         # make it back an OrderedDict
164         out = OrderedDict([(k, v) for k, v in zip(names, results)])
165 
166         return out
167 
168 
169 class LastLevelMaxPool(ExtraFPNBlock):
170     """
171     Applies a max_pool2d on top of the last feature map
172     """
173     def forward(
174         self,
175         x: List[Tensor],
176         y: List[Tensor],
177         names: List[str],
178     ) -> Tuple[List[Tensor], List[str]]:
179         names.append("pool")
180         x.append(F.max_pool2d(x[-1], 1, 2, 0))
181         return x, names
182 
183 
184 class LastLevelP6P7(ExtraFPNBlock):
185     """
186     This module is used in RetinaNet to generate extra layers, P6 and P7.
187     """
188     def __init__(self, in_channels: int, out_channels: int):
189         super(LastLevelP6P7, self).__init__()
190         self.p6 = nn.Conv2d(in_channels, out_channels, 3, 2, 1)
191         self.p7 = nn.Conv2d(out_channels, out_channels, 3, 2, 1)
192         for module in [self.p6, self.p7]:
193             nn.init.kaiming_uniform_(module.weight, a=1)
194             nn.init.constant_(module.bias, 0)
195         self.use_P5 = in_channels == out_channels
196 
197     def forward(
198         self,
199         p: List[Tensor],
200         c: List[Tensor],
201         names: List[str],
202     ) -> Tuple[List[Tensor], List[str]]:
203         p5, c5 = p[-1], c[-1]
204         x = p5 if self.use_P5 else c5
205         p6 = self.p6(x)
206         p7 = self.p7(F.relu(p6))
207         p.extend([p6, p7])
208         names.extend(["p6", "p7"])
209         return p, names
210
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/torchvision/ops/feature_pyramid_network.py b/torchvision/ops/feature_pyramid_network.py
--- a/torchvision/ops/feature_pyramid_network.py
+++ b/torchvision/ops/feature_pyramid_network.py
@@ -86,7 +86,7 @@
             self.layer_blocks.append(layer_block_module)
 
         # 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):
                 nn.init.kaiming_uniform_(m.weight, a=1)
                 nn.init.constant_(m.bias, 0)

{"golden_diff": "diff --git a/torchvision/ops/feature_pyramid_network.py b/torchvision/ops/feature_pyramid_network.py\n--- a/torchvision/ops/feature_pyramid_network.py\n+++ b/torchvision/ops/feature_pyramid_network.py\n@@ -86,7 +86,7 @@\n             self.layer_blocks.append(layer_block_module)\n \n         # initialize parameters now to avoid modifying the initialization of top_blocks\n-        for m in self.children():\n+        for m in self.modules():\n             if isinstance(m, nn.Conv2d):\n                 nn.init.kaiming_uniform_(m.weight, a=1)\n                 nn.init.constant_(m.bias, 0)\n", "issue": "Feature Pyramid Network code bug\nhttps://github.com/pytorch/vision/blob/c2e8a00885e68ae1200eb6440f540e181d9125de/torchvision/ops/feature_pyramid_network.py#L60\r\n\r\nthis line does not work, I think it should be modified as self.modules() instead of self.children()\n", "before_files": [{"content": "from collections import OrderedDict\n\nimport torch\nimport torch.nn.functional as F\nfrom torch import nn, Tensor\n\nfrom torch.jit.annotations import Tuple, List, Dict, Optional\n\n\nclass ExtraFPNBlock(nn.Module):\n    \"\"\"\n    Base class for the extra block in the FPN.\n\n    Arguments:\n        results (List[Tensor]): the result of the FPN\n        x (List[Tensor]): the original feature maps\n        names (List[str]): the names for each one of the\n            original feature maps\n\n    Returns:\n        results (List[Tensor]): the extended set of results\n            of the FPN\n        names (List[str]): the extended set of names for the results\n    \"\"\"\n    def forward(\n        self,\n        results: List[Tensor],\n        x: List[Tensor],\n        names: List[str],\n    ) -> Tuple[List[Tensor], List[str]]:\n        pass\n\n\nclass FeaturePyramidNetwork(nn.Module):\n    \"\"\"\n    Module that adds a FPN from on top of a set of feature maps. This is based on\n    `\"Feature Pyramid Network for Object Detection\" <https://arxiv.org/abs/1612.03144>`_.\n\n    The feature maps are currently supposed to be in increasing depth\n    order.\n\n    The input to the model is expected to be an OrderedDict[Tensor], containing\n    the feature maps on top of which the FPN will be added.\n\n    Arguments:\n        in_channels_list (list[int]): number of channels for each feature map that\n            is passed to the module\n        out_channels (int): number of channels of the FPN representation\n        extra_blocks (ExtraFPNBlock or None): if provided, extra operations will\n            be performed. It is expected to take the fpn features, the original\n            features and the names of the original features as input, and returns\n            a new list of feature maps and their corresponding names\n\n    Examples::\n\n        >>> m = torchvision.ops.FeaturePyramidNetwork([10, 20, 30], 5)\n        >>> # get some dummy data\n        >>> x = OrderedDict()\n        >>> x['feat0'] = torch.rand(1, 10, 64, 64)\n        >>> x['feat2'] = torch.rand(1, 20, 16, 16)\n        >>> x['feat3'] = torch.rand(1, 30, 8, 8)\n        >>> # compute the FPN on top of x\n        >>> output = m(x)\n        >>> print([(k, v.shape) for k, v in output.items()])\n        >>> # returns\n        >>>   [('feat0', torch.Size([1, 5, 64, 64])),\n        >>>    ('feat2', torch.Size([1, 5, 16, 16])),\n        >>>    ('feat3', torch.Size([1, 5, 8, 8]))]\n\n    \"\"\"\n    def __init__(\n        self,\n        in_channels_list: List[int],\n        out_channels: int,\n        extra_blocks: Optional[ExtraFPNBlock] = None,\n    ):\n        super(FeaturePyramidNetwork, self).__init__()\n        self.inner_blocks = nn.ModuleList()\n        self.layer_blocks = nn.ModuleList()\n        for in_channels in in_channels_list:\n            if in_channels == 0:\n                raise ValueError(\"in_channels=0 is currently not supported\")\n            inner_block_module = nn.Conv2d(in_channels, out_channels, 1)\n            layer_block_module = nn.Conv2d(out_channels, out_channels, 3, padding=1)\n            self.inner_blocks.append(inner_block_module)\n            self.layer_blocks.append(layer_block_module)\n\n        # initialize parameters now to avoid modifying the initialization of top_blocks\n        for m in self.children():\n            if isinstance(m, nn.Conv2d):\n                nn.init.kaiming_uniform_(m.weight, a=1)\n                nn.init.constant_(m.bias, 0)\n\n        if extra_blocks is not None:\n            assert isinstance(extra_blocks, ExtraFPNBlock)\n        self.extra_blocks = extra_blocks\n\n    def get_result_from_inner_blocks(self, x: Tensor, idx: int) -> Tensor:\n        \"\"\"\n        This is equivalent to self.inner_blocks[idx](x),\n        but torchscript doesn't support this yet\n        \"\"\"\n        num_blocks = 0\n        for m in self.inner_blocks:\n            num_blocks += 1\n        if idx < 0:\n            idx += num_blocks\n        i = 0\n        out = x\n        for module in self.inner_blocks:\n            if i == idx:\n                out = module(x)\n            i += 1\n        return out\n\n    def get_result_from_layer_blocks(self, x: Tensor, idx: int) -> Tensor:\n        \"\"\"\n        This is equivalent to self.layer_blocks[idx](x),\n        but torchscript doesn't support this yet\n        \"\"\"\n        num_blocks = 0\n        for m in self.layer_blocks:\n            num_blocks += 1\n        if idx < 0:\n            idx += num_blocks\n        i = 0\n        out = x\n        for module in self.layer_blocks:\n            if i == idx:\n                out = module(x)\n            i += 1\n        return out\n\n    def forward(self, x: Dict[str, Tensor]) -> Dict[str, Tensor]:\n        \"\"\"\n        Computes the FPN for a set of feature maps.\n\n        Arguments:\n            x (OrderedDict[Tensor]): feature maps for each feature level.\n\n        Returns:\n            results (OrderedDict[Tensor]): feature maps after FPN layers.\n                They are ordered from highest resolution first.\n        \"\"\"\n        # unpack OrderedDict into two lists for easier handling\n        names = list(x.keys())\n        x = list(x.values())\n\n        last_inner = self.get_result_from_inner_blocks(x[-1], -1)\n        results = []\n        results.append(self.get_result_from_layer_blocks(last_inner, -1))\n\n        for idx in range(len(x) - 2, -1, -1):\n            inner_lateral = self.get_result_from_inner_blocks(x[idx], idx)\n            feat_shape = inner_lateral.shape[-2:]\n            inner_top_down = F.interpolate(last_inner, size=feat_shape, mode=\"nearest\")\n            last_inner = inner_lateral + inner_top_down\n            results.insert(0, self.get_result_from_layer_blocks(last_inner, idx))\n\n        if self.extra_blocks is not None:\n            results, names = self.extra_blocks(results, x, names)\n\n        # make it back an OrderedDict\n        out = OrderedDict([(k, v) for k, v in zip(names, results)])\n\n        return out\n\n\nclass LastLevelMaxPool(ExtraFPNBlock):\n    \"\"\"\n    Applies a max_pool2d on top of the last feature map\n    \"\"\"\n    def forward(\n        self,\n        x: List[Tensor],\n        y: List[Tensor],\n        names: List[str],\n    ) -> Tuple[List[Tensor], List[str]]:\n        names.append(\"pool\")\n        x.append(F.max_pool2d(x[-1], 1, 2, 0))\n        return x, names\n\n\nclass LastLevelP6P7(ExtraFPNBlock):\n    \"\"\"\n    This module is used in RetinaNet to generate extra layers, P6 and P7.\n    \"\"\"\n    def __init__(self, in_channels: int, out_channels: int):\n        super(LastLevelP6P7, self).__init__()\n        self.p6 = nn.Conv2d(in_channels, out_channels, 3, 2, 1)\n        self.p7 = nn.Conv2d(out_channels, out_channels, 3, 2, 1)\n        for module in [self.p6, self.p7]:\n            nn.init.kaiming_uniform_(module.weight, a=1)\n            nn.init.constant_(module.bias, 0)\n        self.use_P5 = in_channels == out_channels\n\n    def forward(\n        self,\n        p: List[Tensor],\n        c: List[Tensor],\n        names: List[str],\n    ) -> Tuple[List[Tensor], List[str]]:\n        p5, c5 = p[-1], c[-1]\n        x = p5 if self.use_P5 else c5\n        p6 = self.p6(x)\n        p7 = self.p7(F.relu(p6))\n        p.extend([p6, p7])\n        names.extend([\"p6\", \"p7\"])\n        return p, names\n", "path": "torchvision/ops/feature_pyramid_network.py"}], "after_files": [{"content": "from collections import OrderedDict\n\nimport torch\nimport torch.nn.functional as F\nfrom torch import nn, Tensor\n\nfrom torch.jit.annotations import Tuple, List, Dict, Optional\n\n\nclass ExtraFPNBlock(nn.Module):\n    \"\"\"\n    Base class for the extra block in the FPN.\n\n    Arguments:\n        results (List[Tensor]): the result of the FPN\n        x (List[Tensor]): the original feature maps\n        names (List[str]): the names for each one of the\n            original feature maps\n\n    Returns:\n        results (List[Tensor]): the extended set of results\n            of the FPN\n        names (List[str]): the extended set of names for the results\n    \"\"\"\n    def forward(\n        self,\n        results: List[Tensor],\n        x: List[Tensor],\n        names: List[str],\n    ) -> Tuple[List[Tensor], List[str]]:\n        pass\n\n\nclass FeaturePyramidNetwork(nn.Module):\n    \"\"\"\n    Module that adds a FPN from on top of a set of feature maps. This is based on\n    `\"Feature Pyramid Network for Object Detection\" <https://arxiv.org/abs/1612.03144>`_.\n\n    The feature maps are currently supposed to be in increasing depth\n    order.\n\n    The input to the model is expected to be an OrderedDict[Tensor], containing\n    the feature maps on top of which the FPN will be added.\n\n    Arguments:\n        in_channels_list (list[int]): number of channels for each feature map that\n            is passed to the module\n        out_channels (int): number of channels of the FPN representation\n        extra_blocks (ExtraFPNBlock or None): if provided, extra operations will\n            be performed. It is expected to take the fpn features, the original\n            features and the names of the original features as input, and returns\n            a new list of feature maps and their corresponding names\n\n    Examples::\n\n        >>> m = torchvision.ops.FeaturePyramidNetwork([10, 20, 30], 5)\n        >>> # get some dummy data\n        >>> x = OrderedDict()\n        >>> x['feat0'] = torch.rand(1, 10, 64, 64)\n        >>> x['feat2'] = torch.rand(1, 20, 16, 16)\n        >>> x['feat3'] = torch.rand(1, 30, 8, 8)\n        >>> # compute the FPN on top of x\n        >>> output = m(x)\n        >>> print([(k, v.shape) for k, v in output.items()])\n        >>> # returns\n        >>>   [('feat0', torch.Size([1, 5, 64, 64])),\n        >>>    ('feat2', torch.Size([1, 5, 16, 16])),\n        >>>    ('feat3', torch.Size([1, 5, 8, 8]))]\n\n    \"\"\"\n    def __init__(\n        self,\n        in_channels_list: List[int],\n        out_channels: int,\n        extra_blocks: Optional[ExtraFPNBlock] = None,\n    ):\n        super(FeaturePyramidNetwork, self).__init__()\n        self.inner_blocks = nn.ModuleList()\n        self.layer_blocks = nn.ModuleList()\n        for in_channels in in_channels_list:\n            if in_channels == 0:\n                raise ValueError(\"in_channels=0 is currently not supported\")\n            inner_block_module = nn.Conv2d(in_channels, out_channels, 1)\n            layer_block_module = nn.Conv2d(out_channels, out_channels, 3, padding=1)\n            self.inner_blocks.append(inner_block_module)\n            self.layer_blocks.append(layer_block_module)\n\n        # initialize parameters now to avoid modifying the initialization of top_blocks\n        for m in self.modules():\n            if isinstance(m, nn.Conv2d):\n                nn.init.kaiming_uniform_(m.weight, a=1)\n                nn.init.constant_(m.bias, 0)\n\n        if extra_blocks is not None:\n            assert isinstance(extra_blocks, ExtraFPNBlock)\n        self.extra_blocks = extra_blocks\n\n    def get_result_from_inner_blocks(self, x: Tensor, idx: int) -> Tensor:\n        \"\"\"\n        This is equivalent to self.inner_blocks[idx](x),\n        but torchscript doesn't support this yet\n        \"\"\"\n        num_blocks = 0\n        for m in self.inner_blocks:\n            num_blocks += 1\n        if idx < 0:\n            idx += num_blocks\n        i = 0\n        out = x\n        for module in self.inner_blocks:\n            if i == idx:\n                out = module(x)\n            i += 1\n        return out\n\n    def get_result_from_layer_blocks(self, x: Tensor, idx: int) -> Tensor:\n        \"\"\"\n        This is equivalent to self.layer_blocks[idx](x),\n        but torchscript doesn't support this yet\n        \"\"\"\n        num_blocks = 0\n        for m in self.layer_blocks:\n            num_blocks += 1\n        if idx < 0:\n            idx += num_blocks\n        i = 0\n        out = x\n        for module in self.layer_blocks:\n            if i == idx:\n                out = module(x)\n            i += 1\n        return out\n\n    def forward(self, x: Dict[str, Tensor]) -> Dict[str, Tensor]:\n        \"\"\"\n        Computes the FPN for a set of feature maps.\n\n        Arguments:\n            x (OrderedDict[Tensor]): feature maps for each feature level.\n\n        Returns:\n            results (OrderedDict[Tensor]): feature maps after FPN layers.\n                They are ordered from highest resolution first.\n        \"\"\"\n        # unpack OrderedDict into two lists for easier handling\n        names = list(x.keys())\n        x = list(x.values())\n\n        last_inner = self.get_result_from_inner_blocks(x[-1], -1)\n        results = []\n        results.append(self.get_result_from_layer_blocks(last_inner, -1))\n\n        for idx in range(len(x) - 2, -1, -1):\n            inner_lateral = self.get_result_from_inner_blocks(x[idx], idx)\n            feat_shape = inner_lateral.shape[-2:]\n            inner_top_down = F.interpolate(last_inner, size=feat_shape, mode=\"nearest\")\n            last_inner = inner_lateral + inner_top_down\n            results.insert(0, self.get_result_from_layer_blocks(last_inner, idx))\n\n        if self.extra_blocks is not None:\n            results, names = self.extra_blocks(results, x, names)\n\n        # make it back an OrderedDict\n        out = OrderedDict([(k, v) for k, v in zip(names, results)])\n\n        return out\n\n\nclass LastLevelMaxPool(ExtraFPNBlock):\n    \"\"\"\n    Applies a max_pool2d on top of the last feature map\n    \"\"\"\n    def forward(\n        self,\n        x: List[Tensor],\n        y: List[Tensor],\n        names: List[str],\n    ) -> Tuple[List[Tensor], List[str]]:\n        names.append(\"pool\")\n        x.append(F.max_pool2d(x[-1], 1, 2, 0))\n        return x, names\n\n\nclass LastLevelP6P7(ExtraFPNBlock):\n    \"\"\"\n    This module is used in RetinaNet to generate extra layers, P6 and P7.\n    \"\"\"\n    def __init__(self, in_channels: int, out_channels: int):\n        super(LastLevelP6P7, self).__init__()\n        self.p6 = nn.Conv2d(in_channels, out_channels, 3, 2, 1)\n        self.p7 = nn.Conv2d(out_channels, out_channels, 3, 2, 1)\n        for module in [self.p6, self.p7]:\n            nn.init.kaiming_uniform_(module.weight, a=1)\n            nn.init.constant_(module.bias, 0)\n        self.use_P5 = in_channels == out_channels\n\n    def forward(\n        self,\n        p: List[Tensor],\n        c: List[Tensor],\n        names: List[str],\n    ) -> Tuple[List[Tensor], List[str]]:\n        p5, c5 = p[-1], c[-1]\n        x = p5 if self.use_P5 else c5\n        p6 = self.p6(x)\n        p7 = self.p7(F.relu(p6))\n        p.extend([p6, p7])\n        names.extend([\"p6\", \"p7\"])\n        return p, names\n", "path": "torchvision/ops/feature_pyramid_network.py"}]}