MCPcopy Create free account
hub / github.com/OpenImagingLab/FlashVSR / __init__

Method __init__

diffsynth/extensions/ImageQualityMetric/BLIP/vit.py:22–29  ·  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

20 """ MLP as used in Vision Transformer, MLP-Mixer and related networks
21 """
22 def __init__(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.):
23 super().__init__()
24 out_features = out_features or in_features
25 hidden_features = hidden_features or in_features
26 self.fc1 = nn.Linear(in_features, hidden_features)
27 self.act = act_layer()
28 self.fc2 = nn.Linear(hidden_features, out_features)
29 self.drop = nn.Dropout(drop)
30
31 def forward(self, x):
32 x = self.fc1(x)

Callers 3

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected