Definition at line 65 of file pooling.py.
◆ __init__()
| fastreid.layers.pooling.AdaptiveAvgMaxPool2d.__init__ |
( |
| self | ) |
|
Definition at line 66 of file pooling.py.
66 def __init__(self):
67 super(AdaptiveAvgMaxPool2d, self).__init__()
68 self.gap = FastGlobalAvgPool2d()
69 self.gmp = nn.AdaptiveMaxPool2d(1)
70
◆ forward()
| fastreid.layers.pooling.AdaptiveAvgMaxPool2d.forward |
( |
| self, |
|
|
| x ) |
Definition at line 71 of file pooling.py.
71 def forward(self, x):
72 avg_feat = self.gap(x)
73 max_feat = self.gmp(x)
74 feat = avg_feat + max_feat
75 return feat
76
77
◆ gap
| fastreid.layers.pooling.AdaptiveAvgMaxPool2d.gap |
◆ gmp
| fastreid.layers.pooling.AdaptiveAvgMaxPool2d.gmp |
The documentation for this class was generated from the following file: