MCPcopy Create free account
hub / github.com/DSL-Lab/StreamSplat / forward

Method forward

encoders/dinov2/layers/block.py:288–296  ·  view source on GitHub ↗
(self, x_or_x_list)

Source from the content-addressed store, hash-verified

286 return attn_bias.split(x)
287
288 def forward(self, x_or_x_list):
289 if isinstance(x_or_x_list, Tensor):
290 return super().forward(x_or_x_list)
291 elif isinstance(x_or_x_list, list):
292 if not XFORMERS_AVAILABLE:
293 raise AssertionError("xFormers is required for using nested tensors")
294 return self.forward_nested(x_or_x_list)
295 else:
296 raise AssertionError

Callers

nothing calls this directly

Calls 2

forward_nestedMethod · 0.95
forwardMethod · 0.45

Tested by

no test coverage detected