MCPcopy Create free account
hub / github.com/UX-Decoder/Semantic-SAM / __init__

Method __init__

semantic_sam/backbone/swin_new.py:24–33  ·  view source on GitHub ↗
(
        self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.0
    )

Source from the content-addressed store, hash-verified

22 """Multilayer perceptron."""
23
24 def __init__(
25 self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.0
26 ):
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 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