MCPcopy Create free account
hub / github.com/OpenDriveLab/DriveAdapter / SELayer

Class SELayer

open_loop_training/code/model_code/backbones/lss.py:146–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144
145
146class SELayer(nn.Module):
147 def __init__(self, channels, act_layer=nn.ReLU, gate_layer=nn.Sigmoid):
148 super().__init__()
149 self.conv_reduce = nn.Conv2d(channels, channels, 1, bias=True)
150 self.act1 = act_layer()
151 self.conv_expand = nn.Conv2d(channels, channels, 1, bias=True)
152 self.gate = gate_layer()
153
154 def forward(self, x, x_se):
155 x_se = self.conv_reduce(x_se)
156 x_se = self.act1(x_se)
157 x_se = self.conv_expand(x_se)
158 return x * self.gate(x_se)
159
160
161class DepthNet(nn.Module):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected