Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reformatting MACE #307

Merged
merged 4 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions hydragnn/models/Base.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import sys
from hydragnn.utils.distributed import get_device
from hydragnn.utils.print.print_utils import print_master
from hydragnn.utils.model.operations import get_edge_vectors_and_lengths

import inspect

Expand Down Expand Up @@ -136,6 +137,10 @@ def _init_conv(self):
self.feature_layers.append(BatchNorm(self.hidden_dim))

def _embedding(self, data):
if not hasattr(data, "edge_shifts"):
data.edge_shifts = torch.zeros(
(data.edge_index.size(1), 3), device=data.edge_index.device
)
conv_args = {"edge_index": data.edge_index.to(torch.long)}
if self.use_edge_attr:
assert (
Expand Down
Loading
Loading