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

Method __init__

PATH/core/models/backbones/vitdet.py:52–59  ·  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

50
51class Mlp(nn.Module):
52 def __init__(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.):
53 super().__init__()
54 out_features = out_features or in_features
55 hidden_features = hidden_features or in_features
56 self.fc1 = nn.Linear(in_features, hidden_features)
57 self.act = act_layer()
58 self.fc2 = nn.Linear(hidden_features, out_features)
59 self.drop = nn.Dropout(drop)
60
61 def forward(self, x):
62 x = self.fc1(x)

Callers 7

__init__Method · 0.45
__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