MCPcopy Create free account
hub / github.com/buaacxf/VIPTR / __init__

Method __init__

modules/SVTR.py:89–101  ·  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

87
88class Mlp(nn.Module):
89 def __init__(self,
90 in_features,
91 hidden_features=None,
92 out_features=None,
93 act_layer=nn.GELU,
94 drop=0.):
95 super().__init__()
96 out_features = out_features or in_features
97 hidden_features = hidden_features or in_features
98 self.fc1 = nn.Linear(in_features, hidden_features)
99 self.act = act_layer()
100 self.fc2 = nn.Linear(hidden_features, out_features)
101 self.drop = nn.Dropout(drop)
102
103 def forward(self, x):
104 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