Model gives different scores for the same drug-target pairs #3

Open
opened 2025-10-14 16:20:03 -06:00 by navan · 0 comments
Owner

Originally created by @pykao on 5/24/2022

Hi Kexin,

I tried to write the inference code to predict the binding affinity probability given the drug-target pairs. However, I found that the model always gives different scores for the same inputs d, p, d_mask, p_mask.

        score = model(d.long().cuda(), p.long().cuda(), d_mask.long().cuda(), p_mask.long().cuda())

Then, I entered two checkpoints in the train.py:

c91a98eced/train.py (L58)

c91a98eced/train.py (L178)

Then, I entered

CUDA_VISIBLE_DEVICES=2,3,5,6 python train.py --task davis

It entered the IPython interface.

In   [1]:   score = model(d.long().cuda(), p.long().cuda(), d_mask.long().cuda(), p_mask.long().cuda())

In   [2]:   score_1 = model(d.long().cuda(), p.long().cuda(), d_mask.long().cuda(), p_mask.long().cuda())

In   [3]:   score == score_1

Out[3]: 
tensor([[False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],                                  
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False],
        [False]], device='cuda:0')

Could you tell me why the model give different scores while the input drug-target pairs are the same?

Best regards,
Po-Yu Kao

*Originally created by @pykao on 5/24/2022* Hi Kexin, I tried to write the inference code to predict the binding affinity probability given the drug-target pairs. However, I found that the `model` always gives different `scores` for the same inputs `d, p, d_mask, p_mask`. score = model(d.long().cuda(), p.long().cuda(), d_mask.long().cuda(), p_mask.long().cuda()) Then, I entered two checkpoints in the `train.py`: https://github.com/pykao/MolTrans/blob/c91a98eced0e18f9b63d439f84355f6225567287/train.py#L58 https://github.com/pykao/MolTrans/blob/c91a98eced0e18f9b63d439f84355f6225567287/train.py#L178 Then, I entered `CUDA_VISIBLE_DEVICES=2,3,5,6 python train.py --task davis` It entered the IPython interface. ``` In [1]: score = model(d.long().cuda(), p.long().cuda(), d_mask.long().cuda(), p_mask.long().cuda()) In [2]: score_1 = model(d.long().cuda(), p.long().cuda(), d_mask.long().cuda(), p_mask.long().cuda()) In [3]: score == score_1 Out[3]: tensor([[False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False]], device='cuda:0') ``` Could you tell me why the model give different scores while the input drug-target pairs are the same? Best regards, Po-Yu Kao
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github/MolTrans#3
No description provided.