Skip to content

Commit

Permalink
Change a range loop to an enumerate
Browse files Browse the repository at this point in the history
  • Loading branch information
RaulPPelaez committed Jun 12, 2023
1 parent 7a738e4 commit 46aa6c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torchmdnet/models/tensornet.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ def forward(
# Embedding from edge-wise tensors to node-wise tensors
X = self.tensor_embedding(z, edge_index, edge_weight, edge_vec, edge_attr)
# Interaction layers
for i in range(self.num_layers):
X = self.layers[i](X, edge_index, edge_weight, edge_attr)
for i, layer in enumerate(self.layers):
X = layer(X, edge_index, edge_weight, edge_attr)
I, A, S = decompose_tensor(X)
x = torch.cat((tensor_norm(I), tensor_norm(A), tensor_norm(S)), dim=-1)
x = self.out_norm(x)
Expand Down

0 comments on commit 46aa6c8

Please sign in to comment.