MCPcopy Create free account
hub / github.com/MotrixLab/ViMoGen / __init__

Method __init__

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

Source from the content-addressed store, hash-verified

221class T5RelativeEmbedding(nn.Module):
222
223 def __init__(self, num_buckets, num_heads, bidirectional, max_dist=128):
224 super(T5RelativeEmbedding, self).__init__()
225 self.num_buckets = num_buckets
226 self.num_heads = num_heads
227 self.bidirectional = bidirectional
228 self.max_dist = max_dist
229
230 # layers
231 self.embedding = nn.Embedding(num_buckets, num_heads)
232
233 def forward(self, lq, lk):
234 device = self.embedding.weight.device

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected