Cannot running GNN+Transformer model #28

Open
opened 2025-10-14 17:39:22 -06:00 by navan · 0 comments
Owner

Originally created by @yrq3027 on 10/13/2022

Hi,
This error happened only in GNN+Transformer model.

Let's use 1 GPU!
--- Data Preparation ---
--- Go for Training ---
Traceback (most recent call last):
File "Pharos_DeepPurpose_ATFP_clf_demo.py", line 103, in
trainModel(coding)
File "Pharos_DeepPurpose_ATFP_clf_demo.py", line 96, in trainModel
model.train(train, val, test)
File "/home/data/aidd/DeepPurpose/DeepPurpose/DTI.py", line 436, in train
score = self.model(v_d, v_p)
File "/home/AIDD/anaconda3/envs/DeepPurpose/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/home/data/aidd/DeepPurpose/DeepPurpose/DTI.py", line 52, in forward
v_f = torch.cat((v_D, v_P), 1)
RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 512 but got size 2 for tensor number 1 in the list.

*Originally created by @yrq3027 on 10/13/2022* Hi, This error happened only in GNN+Transformer model. Let's use 1 GPU! --- Data Preparation --- --- Go for Training --- Traceback (most recent call last): File "Pharos_DeepPurpose_ATFP_clf_demo.py", line 103, in <module> trainModel(coding) File "Pharos_DeepPurpose_ATFP_clf_demo.py", line 96, in trainModel model.train(train, val, test) File "/home/data/aidd/DeepPurpose/DeepPurpose/DTI.py", line 436, in train score = self.model(v_d, v_p) File "/home/AIDD/anaconda3/envs/DeepPurpose/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/home/data/aidd/DeepPurpose/DeepPurpose/DTI.py", line 52, in forward v_f = torch.cat((v_D, v_P), 1) RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 512 but got size 2 for tensor number 1 in the list.
Sign in to join this conversation.
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/DeepPurpose#28
No description provided.