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

Method forward

sat/sgm/modules/autoencoding/magvit2_pytorch.py:788–796  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

786 nn.init.zeros_(conv.bias.data)
787
788 def forward(self, x):
789 x = rearrange(x, "b c t h w -> b h w c t")
790 x, ps = pack_one(x, "* c t")
791
792 out = self.net(x)
793
794 out = unpack_one(out, ps, "* c t")
795 out = rearrange(out, "b h w c t -> b c t h w")
796 return out
797
798
799# autoencoder - only best variant here offered, with causal conv 3d

Callers

nothing calls this directly

Calls 2

pack_oneFunction · 0.70
unpack_oneFunction · 0.70

Tested by

no test coverage detected