MCPcopy Create free account
hub / github.com/MeiGen-AI/MultiTalk / __init__

Method __init__

wan/modules/t5.py:228–236  ·  view source on GitHub ↗
(self, num_buckets, num_heads, bidirectional, max_dist=128)

Source from the content-addressed store, hash-verified

226class T5RelativeEmbedding(nn.Module):
227
228 def __init__(self, num_buckets, num_heads, bidirectional, max_dist=128):
229 super(T5RelativeEmbedding, self).__init__()
230 self.num_buckets = num_buckets
231 self.num_heads = num_heads
232 self.bidirectional = bidirectional
233 self.max_dist = max_dist
234
235 # layers
236 self.embedding = nn.Embedding(num_buckets, num_heads)
237
238 def forward(self, lq, lk):
239 device = self.embedding.weight.device

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected