Skip to content

Commit

Permalink
Simplify exponent
Browse files Browse the repository at this point in the history
  • Loading branch information
JesperDramsch authored Jun 10, 2024
1 parent 5faeafa commit 38e6a17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/anemoi/models/layers/conv.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def message(
if edge_attr is not None:
key_j = key_j + edge_attr

alpha = (query_i * key_j).sum(dim=-1) / self.out_channels ** (1.0 / 2.0)
alpha = (query_i * key_j).sum(dim=-1) / self.out_channels ** 0.5

alpha = softmax(alpha, index, ptr, size_i)
alpha = dropout(alpha, p=self.dropout, training=self.training)
Expand Down

0 comments on commit 38e6a17

Please sign in to comment.