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

Method forward

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

Source from the content-addressed store, hash-verified

261 self.fn = fn
262
263 def forward(self, x, **kwargs):
264 x, x_shift = x.chunk(2, dim=1)
265 x_shift = pad_at_dim(x_shift, (1, -1), dim=2) # shift time dimension
266 x = torch.cat((x, x_shift), dim=1)
267 return self.fn(x, **kwargs)
268
269
270# rmsnorm

Callers

nothing calls this directly

Calls 1

pad_at_dimFunction · 0.85

Tested by

no test coverage detected