Skip to content
Discussion options

You must be logged in to vote

You would need to create a matrix out of your feature dictionary. If you have

features = [{"node": 0, "name":"1","year":2000,"page":1}, ...]

then you can do

xs = [None] * len(features)
for feature in features:
    xs[feature["node"]] = [int(feature["name"]), feature["year"], feature["page"]]
x = torch.tensor(xs)

Second, I only have one edge type, is it ok to set all edge as the same string e.g. as "connect_to"?

Yes

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@zzzLemon
Comment options

@rusty1s
Comment options

@zzzLemon
Comment options

Answer selected by zzzLemon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants