Skip to content

Commit

Permalink
fix: correcting graph get retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
laserkelvin committed May 24, 2024
1 parent 4e87c5d commit 2f8894c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion matsciml/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2365,7 +2365,7 @@ def _toggle_input_grads(
for key in input_keys:
# set require grad for both point cloud and graph tensors
if "graph" in data:
g = data.get("g")
g = data.get("graph")
if isinstance(g, dgl.DGLGraph):
if key in g.ndata:
data["graph"].ndata[key].requires_grad_(True)
Expand Down

0 comments on commit 2f8894c

Please sign in to comment.