Skip to content
Discussion options

You must be logged in to vote

You should calculate mean and standard deviation of node features across all nodes in all training graphs:

mean = train_dataset.data.x.mean(dim=0, keepdim=True)
std = train_dataset.data.x.std(dim=0, keepdim=True)

You can then apply normalization within every graph:

data.x = (data.x - mean) / std

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@SaffronWolf
Comment options

@rusty1s
Comment options

Answer selected by SaffronWolf
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