MCPcopy Create free account
hub / github.com/Vchitect/Latte / get_dim

Method get_dim

tools/utils/layers.py:268–275  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

266 skip_small_t_freqs=self.cfg.get('skip_small_t_freqs', 0))
267
268 def get_dim(self) -> int:
269 if self.cfg.sampling.num_frames_per_video == 1:
270 return 1
271 else:
272 if self.cfg.sampling.type == 'uniform':
273 return self.d + self.time_encoder.get_dim()
274 else:
275 return (self.d + self.time_encoder.get_dim()) * (self.cfg.sampling.num_frames_per_video - 1)
276
277 def forward(self, t: torch.Tensor) -> torch.Tensor:
278 misc.assert_shape(t, [None, self.cfg.sampling.num_frames_per_video])

Callers

nothing calls this directly

Calls 1

get_dimMethod · 0.45

Tested by

no test coverage detected