-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
I am trying to train the model from scratch and see what the results are, but I am having difficulty understanding what file 'Train File' refers to here, for the file_path.
from sklearn.utils import class_weight
if gnnTrain or create_store:
file_path = 'Enter Path to Train File Here'
nodes,labels,edges,mapp,lbl,nemap = load_data(file_path)
l = np.array(labels)
class_weights = class_weight.compute_class_weight(class_weight = "balanced",classes = np.unique(l),y = l)
class_weights = torch.tensor(class_weights,dtype=torch.float).to(device)
criterion = CrossEntropyLoss(weight=class_weights,reduction='mean')
graph = Data(x=torch.tensor(nodes,dtype=torch.float).to(device),y=torch.tensor(labels,dtype=torch.long).to(device), edge_index=torch.tensor(edges,dtype=torch.long).to(device))
Additionally, I noticed that the code to train a Word2vec model from scratch has been provided but it is never used in the code. Could you please explain how I can fix these two issues, so I can produce results from scratch?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels