MCPcopy Create free account
hub / github.com/ImprintLab/MedSegDiff / timestep_embedding

Function timestep_embedding

guided_diffusion/nn.py:106–124  ·  view source on GitHub ↗

Create sinusoidal timestep embeddings. :param timesteps: a 1-D Tensor of N indices, one per batch element. These may be fractional. :param dim: the dimension of the output. :param max_period: controls the minimum frequency of the embeddings. :return: an [N

(timesteps, dim, max_period=10000)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 3

forwardMethod · 0.85
forwardMethod · 0.85
forwardMethod · 0.85

Calls 1

logMethod · 0.80

Tested by

no test coverage detected