Skip to content
Open
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
4 changes: 2 additions & 2 deletions NDP-HNN/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ def train_model(model,
#--- forward one snapshot
state, pred_xyz, inc_logits = model(data, state)

#--- mask nodes that are alive at next time step (t+1)
#--- mask nodes that are alive at current time step (t)
t = int(data.t[0].item())
mask_next = torch.tensor(
[birth_times[c] <= (t + 1) for c in cells],
[birth_times[c] <= t for c in cells],
dtype=torch.bool, device=device
)
target_xyz = torch.tensor(birth_feat[:, :3], device=device)[mask_next]
Expand Down