MCPcopy Create free account
hub / github.com/AtlasAnalyticsLab/AdaFisher / forward

Method forward

Image_Classification/src/models/focalnet.py:358–366  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

356 self.norm = None
357
358 def forward(self, x):
359 B, C, H, W = x.shape
360
361 x = self.proj(x)
362 H, W = x.shape[2:]
363 x = x.flatten(2).transpose(1, 2) # B Ph*Pw C
364 if self.norm is not None:
365 x = self.norm(x)
366 return x, H, W
367
368 def flops(self):
369 Ho, Wo = self.patches_resolution

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected