mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 17:24:32 +02:00
@@ -18,7 +18,7 @@ def FeedForward(dim, mult=4):
|
||||
|
||||
|
||||
def reshape_tensor(x, heads):
|
||||
bs, length, _width = x.shape
|
||||
bs, length, width = x.shape
|
||||
#(bs, length, width) --> (bs, length, n_heads, dim_per_head)
|
||||
x = x.view(bs, length, heads, -1)
|
||||
# (bs, length, n_heads, dim_per_head) --> (bs, n_heads, length, dim_per_head)
|
||||
|
||||
Reference in New Issue
Block a user