Skip to content

Commit

Permalink
Fix bug in TN (#199)
Browse files Browse the repository at this point in the history
A dX**2 operation should be a torch.matmul(dX,dX).
  • Loading branch information
RaulPPelaez authored Jul 3, 2023
1 parent a116847 commit 62d2885
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchmdnet/models/tensornet.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ def forward(self, X, edge_index, edge_weight, edge_attr):
A = self.linears_tensor[4](A.permute(0, 2, 3, 1)).permute(0, 3, 1, 2)
S = self.linears_tensor[5](S.permute(0, 2, 3, 1)).permute(0, 3, 1, 2)
dX = I + A + S
X = X + dX + dX**2
X = X + dX + torch.matmul(dX,dX)
return X

def message(self, I_j, A_j, S_j, edge_attr):
Expand Down

0 comments on commit 62d2885

Please sign in to comment.