Skip to content

Commit

Permalink
Fix typo in builders
Browse files Browse the repository at this point in the history
  • Loading branch information
angeloskath committed Jul 20, 2021
1 parent 801ba89 commit f22c137
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion fast_transformers/builders/transformer_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ def cross_query_dimensions(self):
return self._cross_d_query or self.query_dimensions

@cross_query_dimensions.setter
def cross_attention(self, n):
def cross_query_dimensions(self, n):
self._cross_d_query = n

@property
Expand Down
9 changes: 9 additions & 0 deletions tests/test_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,15 @@ def test_decoder_build(self):
m = torch.rand(1, 13, 7*32)
y = transformer(x, m)

t = TransformerDecoderBuilder.from_kwargs(
n_layers=1,
n_heads=4,
query_dimensions=32,
cross_n_heads=7,
cross_value_dimensions=32,
cross_query_dimensions=32
).get()

def test_recurrent_decoder(self):
transformer = RecurrentDecoderBuilder().get()
builder = RecurrentDecoderBuilder()
Expand Down

0 comments on commit f22c137

Please sign in to comment.