MCPcopy Create free account
hub / github.com/LeapLabTHU/DAT / forward

Method forward

models/dat_blocks.py:405–411  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

403 self.chunk.add_module('drop2', nn.Dropout(drop, inplace=True))
404
405 def forward(self, x):
406
407 _, _, H, W = x.size()
408 x = einops.rearrange(x, 'b c h w -> b (h w) c')
409 x = self.chunk(x)
410 x = einops.rearrange(x, 'b (h w) c -> b c h w', h=H, w=W)
411 return x
412
413class LayerNormProxy(nn.Module):
414

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected