MCPcopy Create free account
hub / github.com/LTH14/mar / __init__

Method __init__

models/diffloss.py:63–70  ·  view source on GitHub ↗
(self, hidden_size, frequency_embedding_size=256)

Source from the content-addressed store, hash-verified

61 Embeds scalar timesteps into vector representations.
62 """
63 def __init__(self, hidden_size, frequency_embedding_size=256):
64 super().__init__()
65 self.mlp = nn.Sequential(
66 nn.Linear(frequency_embedding_size, hidden_size, bias=True),
67 nn.SiLU(),
68 nn.Linear(hidden_size, hidden_size, bias=True),
69 )
70 self.frequency_embedding_size = frequency_embedding_size
71
72 @staticmethod
73 def timestep_embedding(t, dim, max_period=10000):

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected