MCPcopy Create free account
hub / github.com/buaacxf/VIPTR / forward

Method forward

modules/SVTR.py:254–261  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

252 self.prenorm = prenorm
253
254 def forward(self, x):
255 if self.prenorm:
256 x = self.norm1(x + self.drop_path(self.mixer(x)))
257 x = self.norm2(x + self.drop_path(self.mlp(x)))
258 else:
259 x = x + self.drop_path(self.mixer(self.norm1(x)))
260 x = x + self.drop_path(self.mlp(self.norm2(x)))
261 return x
262
263
264class PatchEmbed(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected