Graph-level regression dataset num_classes #9014
-
I have recently dabbled in graph neural networks.
so when i print my dataset[i] it looks like this:
now the problem is that when i print out dataset.num_classes, it shows that i have 1000 classes because i think the _infer_num_classes each target value as its own class. does anyone know how to fix this? how is the dataset supposed to be stored when the task is graph-level regression? One "solution" i tried was changing output channel directly to 1 and it causes all prediction to output the same value. for the whole dataset.
In addition, i am wondering if anyone has a simple implementation/tutorial for graph-level regression task for any open dataset since i can't seem to find one. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
What would you like |
Beta Was this translation helpful? Give feedback.
-
Thank you for your response. I am deeply grateful! I am not sure either. Is it normal for it to return 1000 if i have a dataset of 1000 graphs with different target values (ex.: float ranging from 0 to 50)? In addition, can I confirm if this graph-level regression implementation makes sense?
I realized that when I run the following code to check my output, each one of the instance in the for-loop produces the same output value. (Ex.: 25.123).
any ideas why this might happen? Is it simply an indication of oversmoothing? |
Beta Was this translation helpful? Give feedback.
global_mean_pool
could oversmooth your output, maybe try other pooling methods from here. To debug tryglobal_max_pool
to make sure the NN is indeed learning different features representations.