MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / __init__

Method __init__

PATH/core/models/ops/hrt_helpers/ffn_block.py:14–28  ·  view source on GitHub ↗
(
        self,
        in_features,
        hidden_features=None,
        out_features=None,
        act_layer=nn.GELU,
        drop=0.0,
    )

Source from the content-addressed store, hash-verified

12
13class Mlp(nn.Module):
14 def __init__(
15 self,
16 in_features,
17 hidden_features=None,
18 out_features=None,
19 act_layer=nn.GELU,
20 drop=0.0,
21 ):
22 super().__init__()
23 out_features = out_features or in_features
24 hidden_features = hidden_features or in_features
25 self.fc1 = nn.Linear(in_features, hidden_features)
26 self.act = act_layer()
27 self.fc2 = nn.Linear(hidden_features, out_features)
28 self.drop = nn.Dropout(drop)
29
30 def forward(self, x, H, W):
31 x = self.fc1(x)

Callers 1

__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected