Skip to content

Commit

Permalink
doc: added comments to get_batch
Browse files Browse the repository at this point in the history
  • Loading branch information
anna-grim authored Dec 12, 2024
1 parent e6dc7e0 commit 2c33572
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/deep_neurographs/utils/gnn_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,14 @@ def visit_proposal(p):
root = tuple(util.sample_once(proposals))
queue = [(root[0], 0), (root[1], 0)]
while len(queue) > 0:
# Visit node
# Visit node's neighbors
i, d = queue.pop()
visited.add(i)
for j in fragments_graph.neighbors(i):
if (i, j) not in batch["graph"].edges:
batch["graph"].add_edge(i, j)

# Visit node's proposals
for j in fragments_graph.nodes[i]["proposals"]:
p = frozenset({i, j})
if p in proposals and p in flagged_proposals:
Expand Down

0 comments on commit 2c33572

Please sign in to comment.