(
self,
in_channels,
dim=4,
share_nonlinearity=False,
negative_slope=0.2,
use_rmat=False,
)
| 241 | """VN-Invariant layer.""" |
| 242 | |
| 243 | def __init__( |
| 244 | self, |
| 245 | in_channels, |
| 246 | dim=4, |
| 247 | share_nonlinearity=False, |
| 248 | negative_slope=0.2, |
| 249 | use_rmat=False, |
| 250 | ): |
| 251 | super().__init__() |
| 252 | |
| 253 | self.dim = dim |
| 254 | self.use_rmat = use_rmat |
| 255 | self.vn1 = VNLinearBNLeakyReLU( |
| 256 | in_channels, |
| 257 | in_channels // 2, |
| 258 | dim=dim, |
| 259 | share_nonlinearity=share_nonlinearity, |
| 260 | negative_slope=negative_slope, |
| 261 | ) |
| 262 | self.vn2 = VNLinearBNLeakyReLU( |
| 263 | in_channels // 2, |
| 264 | in_channels // 4, |
| 265 | dim=dim, |
| 266 | share_nonlinearity=share_nonlinearity, |
| 267 | negative_slope=negative_slope, |
| 268 | ) |
| 269 | self.vn_lin = conv1x1( |
| 270 | in_channels // 4, 2 if self.use_rmat else 3, dim=dim) |
| 271 | |
| 272 | def forward(self, x): |
| 273 | """ |
nothing calls this directly
no test coverage detected