MCPcopy Create free account
hub / github.com/SooLab/CGFormer / __init__

Method __init__

model/backbone.py:15–22  ·  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

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

Callers 9

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

Calls

no outgoing calls

Tested by

no test coverage detected