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

Method forward

ldm/modules/midas/midas/blocks.py:320–341  ·  view source on GitHub ↗

Forward pass. Returns: tensor: output

(self, *xs)

Source from the content-addressed store, hash-verified

318 self.skip_add = nn.quantized.FloatFunctional()
319
320 def forward(self, *xs):
321 """Forward pass.
322
323 Returns:
324 tensor: output
325 """
326 output = xs[0]
327
328 if len(xs) == 2:
329 res = self.resConfUnit1(xs[1])
330 output = self.skip_add.add(output, res)
331 # output += res
332
333 output = self.resConfUnit2(output)
334
335 output = nn.functional.interpolate(
336 output, scale_factor=2, mode="bilinear", align_corners=self.align_corners
337 )
338
339 output = self.out_conv(output)
340
341 return output
342

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected