MCPcopy Create free account
hub / github.com/294coder/Dif-PAN / __init__

Method __init__

models/unet_model_google.py:41–47  ·  view source on GitHub ↗
(self, dim)

Source from the content-addressed store, hash-verified

39
40class TimeEmbedding(nn.Module):
41 def __init__(self, dim):
42 super().__init__()
43 self.dim = dim
44 inv_freq = torch.exp(
45 torch.arange(0, dim, 2, dtype=torch.float32) * (-math.log(10000) / dim)
46 )
47 self.register_buffer("inv_freq", inv_freq)
48
49 def forward(self, input):
50 shape = input.shape

Callers

nothing calls this directly

Calls 2

logMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected