MCPcopy Create free account
hub / github.com/alinlab/SelfPatch / forward

Method forward

selfpatch_vision_transformer.py:327–331  ·  view source on GitHub ↗
(self, x, loc=False)

Source from the content-addressed store, hash-verified

325 return self.pos_drop(x)
326
327 def forward(self, x, loc=False):
328 x = self.prepare_tokens(x)
329 for blk in self.blocks:
330 x = blk(x)
331 return x
332
333 def get_intermediate_layers(self, x, n=1):
334 x = self.prepare_tokens(x)

Callers

nothing calls this directly

Calls 1

prepare_tokensMethod · 0.95

Tested by

no test coverage detected