Commit c7af1974 authored by ADRIAN  AYUSO MUNOZ's avatar ADRIAN AYUSO MUNOZ

Updating information and adding final model.

parent d9b13c60
...@@ -419,5 +419,6 @@ def main(epochs, hidden_dim, lr, weight_decay, dropout): ...@@ -419,5 +419,6 @@ def main(epochs, hidden_dim, lr, weight_decay, dropout):
if __name__ == '__main__': if __name__ == '__main__':
# Set of random hyperparameters to train the model. # Set of hyperparameters to train the model.
main(400, 32, 0.01, 1e-4, 0) main(2343, 31, 0.0010235455088934942, 0.005144745056173074, 0.5)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
File added
File added
No preview for this file type
File added
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -163,11 +163,11 @@ if __name__ == '__main__': ...@@ -163,11 +163,11 @@ if __name__ == '__main__':
k = 50 k = 50
# Set of hyperparameters. # Set of hyperparameters.
epochs = 2752 epochs = 2343
hidden_dim = 107 hidden_dim = 31
lr = 0.0008317 lr = 0.0010235455088934942
weight_decay = 0.006314 weight_decay = 0.005144745056173074
dropout = 0.8 dropout = 0.5
# Train and test k models and obtain their metrics. # Train and test k models and obtain their metrics.
for i in range(k): for i in range(k):
......
...@@ -28,10 +28,11 @@ def filterPreds(original, pred): ...@@ -28,10 +28,11 @@ def filterPreds(original, pred):
head = i head = i
tail = torch.arange(0, len(pred_labels)) # All tails. tail = torch.arange(0, len(pred_labels)) # All tails.
indexH = ((headsO == head).nonzero(as_tuple=True)[0]) # Index of those heads originally present in the graph. indexH = ((headsO == head).nonzero(as_tuple=True)[0]) # Index of those heads originally present in the graph.
#Check
print(len(tail))
for index in indexH: for index in indexH:
tail = tail[tail != index] # Just get those tails not present in the original graph. tail = tail[tail != index] # Just get those tails not present in the original graph.
print(len(tail))
new.append([head, tail, pred_labels[tail].cpu().detach().numpy()]) # New predictions are appended. new.append([head, tail, pred_labels[tail].cpu().detach().numpy()]) # New predictions are appended.
return new return new
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment