Shortcuts

Source code for mmrotate.models.utils.ripool

# Copyright (c) OpenMMLab. All rights reserved.
from torch import nn


[docs]class RotationInvariantPooling(nn.Module): """Rotating invariant pooling module. Args: nInputPlane (int): The number of Input plane. nOrientation (int, optional): The number of oriented channels. """ def __init__(self, nInputPlane, nOrientation=8): super(RotationInvariantPooling, self).__init__() self.nInputPlane = nInputPlane self.nOrientation = nOrientation
[docs] def forward(self, x): """Forward function.""" N, c, h, w = x.size() x = x.view(N, -1, self.nOrientation, h, w) x, _ = x.max(dim=2, keepdim=False) return x
Read the Docs v: stable
Versions
latest
stable
1.x
v1.0.0rc0
v0.3.4
v0.3.3
v0.3.2
v0.3.1
v0.3.0
v0.2.0
v0.1.1
v0.1.0
main
dev
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.