Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch node labels to node features (node attributes) #46

Open
kevinkle opened this issue May 29, 2019 · 1 comment
Open

switch node labels to node features (node attributes) #46

kevinkle opened this issue May 29, 2019 · 1 comment
Assignees

Comments

@kevinkle
Copy link
Member

This changes #26 , our nodes will then be un-"labeled" but instead tagged with an attribute for what we think the kmer is

def benchmark_task_val(args, writer=None, feat='node-label'):
477     all_vals = []
478     graphs = load_data.read_graphfile(args.datadir, args.bmname, max_nodes=args.max_nodes)
479 
480     if feat == 'node-feat' and 'feat_dim' in graphs[0].graph:
481         print('Using node features')
482         input_dim = graphs[0].graph['feat_dim']
483     elif feat == 'node-label' and 'label' in graphs[0].node[0]:
484         print('Using node labels')
485         for G in graphs:
486             for u in G.nodes():
487                 G.node[u]['feat'] = np.array(G.node[u]['label'])
@kevinkle
Copy link
Member Author

Should keep this in mind as pytorch geometric's implementation of diffpool uses the same setup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant