mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-03-25 16:09:49 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
9e9a3131a3
commit
041571772e
@ -93,7 +93,9 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
# usage
|
# usage
|
||||||
rng = np.random.default_rng()
|
rng = np.random.default_rng()
|
||||||
x = rng.standard_normal((2, 10, 4)) # Batch size 2, sequence length 10, embedding dimension 4
|
x = rng.standard_normal(
|
||||||
|
(2, 10, 4)
|
||||||
|
) # Batch size 2, sequence length 10, embedding dimension 4
|
||||||
attention = SlidingWindowAttention(embed_dim=4, window_size=3)
|
attention = SlidingWindowAttention(embed_dim=4, window_size=3)
|
||||||
output = attention.forward(x)
|
output = attention.forward(x)
|
||||||
print(output)
|
print(output)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user