MCPcopy Create free account
hub / github.com/VisionXLab/OF-Diff / __init__

Method __init__

ldm/modules/midas/midas/vit.py:32–36  ·  view source on GitHub ↗
(self, in_features, start_index=1)

Source from the content-addressed store, hash-verified

30
31class ProjectReadout(nn.Module):
32 def __init__(self, in_features, start_index=1):
33 super(ProjectReadout, self).__init__()
34 self.start_index = start_index
35
36 self.project = nn.Sequential(nn.Linear(2 * in_features, in_features), nn.GELU())
37
38 def forward(self, x):
39 readout = x[:, 0].unsqueeze(1).expand_as(x[:, self.start_index :])

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected