MCPcopy Create free account
hub / github.com/Vegetebird/GraphMLP / __init__

Method __init__

model/block/mlp_gcn.py:26–33  ·  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

24
25class Mlp(nn.Module):
26 def __init__(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.):
27 super().__init__()
28 out_features = out_features or in_features
29 hidden_features = hidden_features or in_features
30 self.fc1 = nn.Linear(in_features, hidden_features)
31 self.act = act_layer()
32 self.fc2 = nn.Linear(hidden_features, out_features)
33 self.drop = nn.Dropout(drop)
34
35 def forward(self, x):
36 x = self.fc1(x)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected