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

Method __init__

tools/utils/layers.py:303–311  ·  view source on GitHub ↗
(self,
            max_num_frames: int,            # Maximum T size
            skip_small_t_freqs: int=0,      # How many high frequencies we should skip
        )

Source from the content-addressed store, hash-verified

301@persistence.persistent_class
302class FixedTimeEncoder(nn.Module):
303 def __init__(self,
304 max_num_frames: int, # Maximum T size
305 skip_small_t_freqs: int=0, # How many high frequencies we should skip
306 ):
307 super().__init__()
308
309 assert max_num_frames >= 1, f"Wrong max_num_frames: {max_num_frames}"
310 fourier_coefs = construct_log_spaced_freqs(max_num_frames, skip_small_t_freqs=skip_small_t_freqs)
311 self.register_buffer('fourier_coefs', fourier_coefs) # [1, num_fourier_feats]
312
313 def get_dim(self) -> int:
314 return self.fourier_coefs.shape[1] * 2

Callers

nothing calls this directly

Calls 2

__init__Method · 0.45

Tested by

no test coverage detected