MCPcopy Create free account
hub / github.com/TPCD/DCCL / __init__

Method __init__

model/attribute_classifier.py:65–72  ·  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

63
64class Mlp(nn.Module):
65 def __init__(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.):
66 super().__init__()
67 out_features = out_features or in_features
68 hidden_features = hidden_features or in_features
69 self.fc1 = nn.Linear(in_features, hidden_features)
70 self.act = act_layer()
71 self.fc2 = nn.Linear(hidden_features, out_features)
72 self.drop = nn.Dropout(drop)
73
74 def forward(self, x):
75 x = self.fc1(x)

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected