Skip to content

Commit

Permalink
changes tp helper scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Alpay Sedat Durukan committed Apr 13, 2022
1 parent d409acd commit 7b963e1
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
Binary file modified __pycache__/helper.cpython-39.pyc
Binary file not shown.
17 changes: 10 additions & 7 deletions helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,16 @@ def train_test_loader(data_list, graph_data):
def get_data(graph_data, folder_path):
data_list = []
for file_ in graph_data:
G=nx.read_gpickle(f"{folder_path}/{file_}")
data = get_data_from_graph(G)
A = get_adjacency_matrix(G)
data.x = torch.from_numpy(A).float()
data.y = return_labels(G)
data.train_mask, data.val_mask, data.test_mask = retrieve_masks(data.y)
data_list.append(data)
if 'gpickle' in file_:
print(file_)
G=nx.read_gpickle(f"{folder_path}/{file_}")
print(G)
data = get_data_from_graph(G)
A = get_adjacency_matrix(G)
data.x = torch.from_numpy(A).float()
data.y = return_labels(G)
data.train_mask, data.val_mask, data.test_mask = retrieve_masks(data.y)
data_list.append(data)
return data_list

def report_training_accuracy(accuracy_dict):
Expand Down
2 changes: 1 addition & 1 deletion logger.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
evaluate.py -> Imports are successful.
train.py -> Imports are successful.
1 change: 0 additions & 1 deletion test_data/readme.txt
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
Storing the test data.
1 change: 0 additions & 1 deletion train_data/readme.txt
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
Storing the training data.

0 comments on commit 7b963e1

Please sign in to comment.