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

prediction values changing with a number of input molecules #363

Open
sleeper2173 opened this issue Jun 23, 2019 · 3 comments
Open

prediction values changing with a number of input molecules #363

sleeper2173 opened this issue Jun 23, 2019 · 3 comments

Comments

@sleeper2173
Copy link

I am trying to predict molecular properties using a pre-traind model. Howeber, I find that the predicted values are changing with a different number of input molecules and a different batchsize parameter in the predict() function. How to get unique values?

@corochann
Copy link
Member

Which model (network) you are using?
Can you share your prediction code?

Please refer typical usage for predict method.
https://github.com/pfnet-research/chainer-chemistry/blob/master/examples/qm9/predict_qm9.py#L146

@sleeper2173
Copy link
Author

train_qm9.py.txt
predict_qm9.py.txt

Thank you for your quick reply. I attached the code files train_qm9.py (same as the original) and predict_qm9.py (just modified few lines). Our problem could be reproduced as follows:

  1. training a qm9 model
    python train_qm9.py
    --method ggnn
    --label A
    --conv-layers 1
    --gpu 0
    --epoch 10
    --unit-num 10
    --num-data 100

  2. predict the property of the first molecule
    python predict_qm9.py
    --method ggnn
    --label A
    --gpu -1
    --num-data 1

  3. predict the properties of the first 10 molecules
    python predict_qm9.py
    --method ggnn
    --label A
    --gpu -1
    --num-data 10

I get the difference between predicted values of the first molecule at 2) and 3).

@corochann
Copy link
Member

Thank you for the report.

What we know is actually current GGNN model is not input size invariant. When 0-vector is padded for the "virtual node", its output value changes.
We are going to fix this by the following PR.
#311

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

2 participants