Skip to content

Commit

Permalink
feat: graph data sets
Browse files Browse the repository at this point in the history
  • Loading branch information
anna-grim committed Apr 12, 2024
1 parent c0d4a0e commit 4916a65
Show file tree
Hide file tree
Showing 5 changed files with 354 additions and 104 deletions.
14 changes: 8 additions & 6 deletions src/deep_neurographs/machine_learning/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@author: Anna Grim
@email: anna.grim@alleninstitute.org
Custom datasets for deep learning models.
Custom datasets for training deep learning models.
"""

Expand Down Expand Up @@ -230,11 +230,6 @@ def __getitem__(self, idx):
return {"inputs": inputs, "targets": self.targets[idx]}


class ProposalGraphDataset(Dataset):
def __init__(self, neurograph, inputs, labels):
pass


# Augmentation
class AugmentImages:
"""
Expand Down Expand Up @@ -284,6 +279,13 @@ def run(self, arr):
return self.transform(arr)


def get_lengths(neurograph):
lengths = []
for edge in neurograph.proposals.keys():
lengths.append(neurograph.proposal_length(edge))
return lengths


# -- utils --
def reformat(arr):
"""
Expand Down
Loading

0 comments on commit 4916a65

Please sign in to comment.