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

Method forward

ldm/modules/midas/midas/vit.py:23–28  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

21 self.start_index = start_index
22
23 def forward(self, x):
24 if self.start_index == 2:
25 readout = (x[:, 0] + x[:, 1]) / 2
26 else:
27 readout = x[:, 0]
28 return x[:, self.start_index :] + readout.unsqueeze(1)
29
30
31class ProjectReadout(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected