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

Method forward

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

Source from the content-addressed store, hash-verified

203 self.fn = fn
204
205 def forward(self, x, **kwargs):
206 x = rearrange(x, "b c f ... -> b ... f c")
207 x, ps = pack_one(x, "* n c")
208
209 o = self.fn(x, **kwargs)
210
211 o = unpack_one(o, ps, "* n c")
212 return rearrange(o, "b ... f c -> b c f ...")
213
214
215class SqueezeExcite(Module):

Callers

nothing calls this directly

Calls 2

pack_oneFunction · 0.70
unpack_oneFunction · 0.70

Tested by

no test coverage detected