Skip to content

Commit

Permalink
number of diamonds increased
Browse files Browse the repository at this point in the history
  • Loading branch information
Alpay Sedat Durukan committed Apr 13, 2022
1 parent 1900019 commit 102f9eb
Show file tree
Hide file tree
Showing 55 changed files with 10 additions and 7 deletions.
Binary file modified __pycache__/gat_net.cpython-39.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion create_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def return_labels(G):
# reset Graph
G = nx.MultiDiGraph
# generate new random number for number of diamonds and nodes in total
num_diamonds = randint(1, 4)
num_diamonds = randint(5, 8)
#num_diamonds = 5
#num_nodes = randint(300, 500)
num_nodes = 300
Expand Down
14 changes: 9 additions & 5 deletions evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,22 @@
def evaluate(data):
model.eval()
out, accs = model(data.x, data.edge_index), []
for _, mask in data('train_mask'):
acc = float((out[mask].argmax(-1) == data.y[mask]).sum() / mask.sum())
accs.append(acc)
#for _, mask in data('train_mask'):
#print(type(out))
#print("\n")
print(out.argmax(-1))
print(data.y)
acc = float((out.argmax(-1) == data.y).sum() / data.y.sum())
accs.append(acc)
return accs
# acc_graph[i] = acc_data
# report_training_accuracy(acc_graph)

for data, i in zip(data_list, range(len(data_list))):
accs = evaluate(data)
acc_graph[i] = accs
print(acc_graph)
print(type(acc_graph))
#print(acc_graph)
#print(type(acc_graph))
#report_training_accuracy(acc_graph)
# acc_graph = evaluate()
# print(acc_graph)
Binary file modified models/gat_300_2
Binary file not shown.
Binary file modified test_data/dataset_43_D.gpickle
Binary file not shown.
Binary file modified test_data/dataset_44_D.gpickle
Binary file not shown.
Binary file modified test_data/dataset_45_D.gpickle
Binary file not shown.
Binary file modified test_data/dataset_46_D.gpickle
Binary file not shown.
Binary file modified test_data/dataset_47_D.gpickle
Binary file not shown.
Binary file modified test_data/dataset_48_D.gpickle
Binary file not shown.
Binary file modified test_data/dataset_49_D.gpickle
Binary file not shown.
1 change: 0 additions & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ def train(data):
for epoch in range(1, 20):
loss = train(data)
train_acc = test(data)
#test_acc = test(data)
print(f"loss: {loss}, train_ accuracy : {train_acc}")
#print(f'Epoch: {epoch:03d}, Loss: {loss:.4f}, Train Acc: {train_acc:.4f} Test Acc: {test_acc:.4f}')
torch.save(model, "models/gat_300_2")
Expand Down
Binary file modified train_data/dataset_0_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_10_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_11_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_12_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_13_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_14_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_15_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_16_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_17_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_18_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_19_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_1_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_20_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_21_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_22_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_23_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_24_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_25_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_26_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_27_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_28_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_29_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_2_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_30_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_31_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_32_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_33_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_34_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_35_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_36_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_37_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_38_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_39_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_3_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_40_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_41_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_42_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_4_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_5_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_6_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_7_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_8_D.gpickle
Binary file not shown.
Binary file modified train_data/dataset_9_D.gpickle
Binary file not shown.

0 comments on commit 102f9eb

Please sign in to comment.