MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / forward

Method forward

sat/sgm/modules/autoencoding/magvit2_pytorch.py:436–443  ·  view source on GitHub ↗
(self, x, *args, **kwargs)

Source from the content-addressed store, hash-verified

434
435class TimeAttention(Attention):
436 def forward(self, x, *args, **kwargs):
437 x = rearrange(x, "b c t h w -> b h w t c")
438 x, batch_ps = pack_one(x, "* t c")
439
440 x = super().forward(x, *args, **kwargs)
441
442 x = unpack_one(x, batch_ps, "* t c")
443 return rearrange(x, "b h w t c -> b c t h w")
444
445
446class GEGLU(Module):

Callers

nothing calls this directly

Calls 3

pack_oneFunction · 0.70
unpack_oneFunction · 0.70
forwardMethod · 0.45

Tested by

no test coverage detected