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

Method forward

sat/sgm/modules/video_attention.py:99–103  ·  view source on GitHub ↗
(self, x: torch.Tensor, context: torch.Tensor = None, timesteps: int = None)

Source from the content-addressed store, hash-verified

97 print(f"{self.__class__.__name__} is using checkpointing")
98
99 def forward(self, x: torch.Tensor, context: torch.Tensor = None, timesteps: int = None) -> torch.Tensor:
100 if self.checkpoint:
101 return checkpoint(self._forward, x, context, timesteps)
102 else:
103 return self._forward(x, context, timesteps=timesteps)
104
105 def _forward(self, x, context=None, timesteps=None):
106 assert self.timesteps or timesteps

Callers

nothing calls this directly

Calls 2

_forwardMethod · 0.95
checkpointFunction · 0.50

Tested by

no test coverage detected