Skip to content

Commit 101e6cf

Browse files
authored
Update test_selfattention.py
Signed-off-by: Lucas Robinet <[email protected]>
1 parent ea687ad commit 101e6cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_selfattention.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def test_masked_selfattention(self):
134134
assert torch.allclose(att_mat[:, ~mask.squeeze(0)], torch.zeros_like(att_mat[:, ~mask.squeeze(0)]))
135135

136136
def test_causal_and_mask(self):
137-
with self.assertRaises(AssertionError):
137+
with self.assertRaises(ValueError):
138138
block = SABlock(hidden_size=128, num_heads=1, causal=True, sequence_length=64)
139139
inputs = torch.randn(2, 64, 128)
140140
mask = torch.randint(0, 2, (2, 64)).bool()

0 commit comments

Comments
 (0)