Skip to content

Commit 5fbd0dd

Browse files
committed
fix inf
1 parent abfa9c5 commit 5fbd0dd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

graph_net/torch/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ def apply_templates(forward_code: str) -> str:
1717
imports = "import torch"
1818
if "device" in forward_code:
1919
imports += "\n\nfrom torch import device"
20+
if "inf" in forward_code:
21+
imports += "\n\nfrom torch import inf"
2022
return f"{imports}\n\nclass GraphModule(torch.nn.Module):\n{tab}{forward_code}"
2123

2224

0 commit comments

Comments
 (0)