(
self, channels, rd_ratio=1./16, rd_channels=None, rd_divisor=1,
spatial_kernel_size=7, act_layer=nn.ReLU, gate_layer='sigmoid', mlp_bias=False)
| 97 | |
| 98 | class LightCbamModule(nn.Module): |
| 99 | def __init__( |
| 100 | self, channels, rd_ratio=1./16, rd_channels=None, rd_divisor=1, |
| 101 | spatial_kernel_size=7, act_layer=nn.ReLU, gate_layer='sigmoid', mlp_bias=False): |
| 102 | super(LightCbamModule, self).__init__() |
| 103 | self.channel = LightChannelAttn( |
| 104 | channels, rd_ratio=rd_ratio, rd_channels=rd_channels, |
| 105 | rd_divisor=rd_divisor, act_layer=act_layer, gate_layer=gate_layer, mlp_bias=mlp_bias) |
| 106 | self.spatial = LightSpatialAttn(spatial_kernel_size) |
| 107 | |
| 108 | def forward(self, x): |
| 109 | x = self.channel(x) |
nothing calls this directly
no test coverage detected