Skip to content

Commit

Permalink
check
Browse files Browse the repository at this point in the history
  • Loading branch information
RasmusOrsoe committed May 20, 2024
1 parent b31aa42 commit f51bcc6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/graphnet/training/labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,7 @@ def __init__(

def __call__(self, graph: Data) -> torch.tensor:
"""Compute label for `graph`."""
label = (torch.abs(graph[self._pid_key]) == 14) & (graph[self._int_key] == 1)
is_numu = torch.abs(graph[self._pid_key]) == 14
is_cc = graph[self._int_key] == 1
label = is_numu & is_cc
return label.type(torch.int)

0 comments on commit f51bcc6

Please sign in to comment.