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

Method forward

selfpatch_vision_transformer.py:475–479  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

473 nn.init.constant_(m.bias, 0)
474
475 def forward(self, x):
476 x = self.mlp(x)
477 x = nn.functional.normalize(x, dim=-1, p=2)
478 x = self.last_layer(x)
479 return x

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected