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

Class TimeAttention

sat/sgm/modules/autoencoding/magvit2_pytorch.py:435–443  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

433
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 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected