MCPcopy Create free account
hub / github.com/InternRobotics/P3Former / __init__

Method __init__

p3former/decode_heads/p3former_head.py:164–179  ·  view source on GitHub ↗
(self, channels)

Source from the content-addressed store, hash-verified

162
163class MLP(nn.Module):
164 def __init__(self, channels):
165 super().__init__()
166 self.mlp = nn.ModuleList()
167 for cc in range(len(channels) - 2):
168 self.mlp.append(
169 nn.Sequential(
170 nn.Linear(
171 channels[cc],
172 channels[cc + 1],
173 bias=False),
174 build_norm_layer(
175 dict(type='LN'), channels[cc + 1])[1],
176 build_activation_layer(
177 dict(type='GELU'))))
178 self.mlp.append(
179 nn.Linear(channels[-2], channels[-1]))
180
181 def forward(self, input):
182 for layer in self.mlp:

Callers 3

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected