Skip to content

Commit

Permalink
Use in-place division for BufferList containing mesh graph node features
Browse files Browse the repository at this point in the history
  • Loading branch information
joeloskarsson committed Dec 17, 2024
1 parent e61bdfe commit ff0c8e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion neural_lam/models/base_graph_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(
if name == "mesh_static_features":
max_coord = datastore.get_xy("state").max()
# Rescale by dividing by maximum coordinate in interior
attr_value = attr_value / max_coord
attr_value /= max_coord

# Make BufferLists module members and register tensors as buffers
if isinstance(attr_value, torch.Tensor):
Expand Down

0 comments on commit ff0c8e0

Please sign in to comment.