-
Notifications
You must be signed in to change notification settings - Fork 333
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
How to evaluate a graph regression model with new data? #428
Comments
Like you said, you would need to call the model on the matrices describing your graph, so |
Thanks, but I am still not able to do it. Why the following piece of code does not work?:
The adjacency matrix is already sparse, because I am reading it from a graph of my training dataset, and it was made sparse before training. This is my model, I do not use the edge features in this case:
An error occurs when doing the first convolution: |
Sorry, it's actually a bit more involved than that. Your input must contain the In other words:
You don't pass Also, |
Ok, now the following code produces an error in the global pool layer:
The error message is:
The only way I can evaluate the energy of a single graph is defining a disjoint loader with a dataset of only that graph. But maybe there is a better way to do it. |
Hi, I slightly modified the qm9_ecc.py example (in disjoint mode) to construct a graph regression model to predict the energy of molecules (my dataset is different to QM9). For each molecular geometry I define a graph with
graph=Graph(x=x,a=a,e=e,y=energy)
, which I add to the graph dataset. It works pretty well when I evaluate the model on the test dataset with a disjoint loader, but now I want to use this model to predict the energy on different data.I would like to make predictions on new molecules (graphs) one by one, because I need to know the energy of a molecule to generate the next molecule. From a molecular geometry I define the data matrices of the graph,
(x,a,e,y)
, but I do not know how to predict its energy with the pre-trained model. I would need something likeenergy = model(graph, training=False)
, orenergy = model(inputs, training=False)
whereinputs=[x,a,e,y]
. I have tried using a SingleLoader but it does not work. From my graph object or data matrices (x,a,e), how could I evaluate the pre-trained model on it?Thanks in advance,
Alfonso
The text was updated successfully, but these errors were encountered: