MCPcopy Create free account
hub / github.com/MotrixLab/AiOS / __init__

Method __init__

models/aios/backbones/swin_transformer.py:12–24  ·  view source on GitHub ↗
(self,
                 in_features,
                 hidden_features=None,
                 out_features=None,
                 act_layer=nn.GELU,
                 drop=0.)

Source from the content-addressed store, hash-verified

10class Mlp(nn.Module):
11 """Multilayer perceptron."""
12 def __init__(self,
13 in_features,
14 hidden_features=None,
15 out_features=None,
16 act_layer=nn.GELU,
17 drop=0.):
18 super().__init__()
19 out_features = out_features or in_features
20 hidden_features = hidden_features or in_features
21 self.fc1 = nn.Linear(in_features, hidden_features)
22 self.act = act_layer()
23 self.fc2 = nn.Linear(hidden_features, out_features)
24 self.drop = nn.Dropout(drop)
25
26 def forward(self, x):
27 x = self.fc1(x)

Callers 6

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected