Skip to content

Commit

Permalink
Check that we correctly set the key transform
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldk committed Dec 13, 2023
1 parent e92d581 commit 06be6dd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions thinc/tests/layers/test_parametric_attention_v2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from thinc.layers.parametricattention_v2 import (
KEY_TRANSFORM_REF,
ParametricAttention_v2,
)
from thinc.layers.gelu import Gelu


def test_key_transform_used():
attn = ParametricAttention_v2(key_transform=Gelu())
assert attn.get_ref(KEY_TRANSFORM_REF).name == "gelu"

0 comments on commit 06be6dd

Please sign in to comment.