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

Error while running MultiDCP #2

Open
wioxio opened this issue Apr 23, 2023 · 2 comments
Open

Error while running MultiDCP #2

wioxio opened this issue Apr 23, 2023 · 2 comments

Comments

@wioxio
Copy link

wioxio commented Apr 23, 2023

Thanks for the previous answer.
I downloaded github and got the following error when I ran it:

Traceback (most recent call last):
File "../MultiDCP/multidcp_ae.py", line 290, in
model_training(args, model, data, ae_data, metrics_summary)
File "../MultiDCP/multidcp_ae.py", line 82, in model_training
predict, cell_hidden_ = model(input_cell_gex=cell_feature, input_drug = drug,
File "/path/MultiDCP/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1148, in call_impl
result = forward_call(*input, **kwargs)
File "/path/MultiDCP/MultiDCP-master/MultiDCP/models/multidcp.py", line 382, in forward
return self.perturbed_trans(input_cell_gex, input_drug, input_gene, mask,
File "/path/MultiDCP/MultiDCP-master/MultiDCP/models/multidcp.py", line 389, in perturbed_trans
out, cell_hidden
= self.multidcp(input_drug, input_gene, mask, input_cell_gex,
File "/path/MultiDCP/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1148, in _call_impl
result = forward_call(*input, **kwargs)
File "/path/MultiDCP/MultiDCP-master/MultiDCP/models/multidcp.py", line 198, in forward
pert_idose_embed = self.pert_idose_embed(input_pert_idose)
File "/path/MultiDCP/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/path/MultiDCP/lib/python3.8/site-packages/torch/nn/modules/linear.py", line 114, in forward
return F.linear(input, self.weight, self.bias)
RuntimeError: mat1 and mat2 shapes cannot be multiplied (64x14 and 6x4)

The train_multidcp_ae.sh was like the following:

CUDA_VISIBLE_DEVICES=3 python ../MultiDCP/multidcp_ae.py --drug_file "/path/MultiDCP/data/data/all_drugs_l1000.csv"
--gene_file "/path/MultiDCP/data/data/gene_vector.csv" --train_file "/path/MultiDCP/data/data/pert_transcriptom/signature_train_cell_1.csv"
--dev_file "/path/MultiDCP/data/data/pert_transcriptom/signature_dev_cell_1.csv" --test_file "/path/MultiDCP/data/data/pert_transcriptom/signature_test_cell_1.csv"
--dropout 0.3 --batch_size 64 --max_epoch 500
--seed 633
--ae_input_file "/path/MultiDCP/data/data/gene_expression_for_ae/gene_expression_combat_norm_978_split4"
--ae_label_file "/path/MultiDCP/data/data/gene_expression_for_ae/gene_expression_combat_norm_978_split4"
--cell_ge_file "/path/MultiDCP/data/data/adjusted_ccle_tcga_ad_tpm_log2.csv"
--all_cells "/path/MultiDCP/data/data/ccle_tcga_ad_cells.p" \

/path/MultiDCP/output/cellwise_output_ran5.txt

Could you guess what could have been possibly wrong?
Thanks.

@AdorableYoyo
Copy link
Member

Thanks for the previous answer. I downloaded github and got the following error when I ran it:

Traceback (most recent call last): File "../MultiDCP/multidcp_ae.py", line 290, in model_training(args, model, data, ae_data, metrics_summary) File "../MultiDCP/multidcp_ae.py", line 82, in model_training predict, cell_hidden_ = model(input_cell_gex=cell_feature, input_drug = drug, File "/path/MultiDCP/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1148, in call_impl result = forward_call(*input, **kwargs) File "/path/MultiDCP/MultiDCP-master/MultiDCP/models/multidcp.py", line 382, in forward return self.perturbed_trans(input_cell_gex, input_drug, input_gene, mask, File "/path/MultiDCP/MultiDCP-master/MultiDCP/models/multidcp.py", line 389, in perturbed_trans out, cell_hidden = self.multidcp(input_drug, input_gene, mask, input_cell_gex, File "/path/MultiDCP/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1148, in _call_impl result = forward_call(*input, **kwargs) File "/path/MultiDCP/MultiDCP-master/MultiDCP/models/multidcp.py", line 198, in forward pert_idose_embed = self.pert_idose_embed(input_pert_idose) File "/path/MultiDCP/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/path/MultiDCP/lib/python3.8/site-packages/torch/nn/modules/linear.py", line 114, in forward return F.linear(input, self.weight, self.bias) RuntimeError: mat1 and mat2 shapes cannot be multiplied (64x14 and 6x4)

The train_multidcp_ae.sh was like the following:

CUDA_VISIBLE_DEVICES=3 python ../MultiDCP/multidcp_ae.py --drug_file "/path/MultiDCP/data/data/all_drugs_l1000.csv" --gene_file "/path/MultiDCP/data/data/gene_vector.csv" --train_file "/path/MultiDCP/data/data/pert_transcriptom/signature_train_cell_1.csv" --dev_file "/path/MultiDCP/data/data/pert_transcriptom/signature_dev_cell_1.csv" --test_file "/path/MultiDCP/data/data/pert_transcriptom/signature_test_cell_1.csv" --dropout 0.3 --batch_size 64 --max_epoch 500 --seed 633 --ae_input_file "/path/MultiDCP/data/data/gene_expression_for_ae/gene_expression_combat_norm_978_split4" --ae_label_file "/path/MultiDCP/data/data/gene_expression_for_ae/gene_expression_combat_norm_978_split4" --cell_ge_file "/path/MultiDCP/data/data/adjusted_ccle_tcga_ad_tpm_log2.csv" --all_cells "/path/MultiDCP/data/data/ccle_tcga_ad_cells.p" \

/path/MultiDCP/output/cellwise_output_ran5.txt

Could you guess what could have been possibly wrong? Thanks.

Hi, it is fixed now.
Please pull the repo to the latest version.

@wioxio
Copy link
Author

wioxio commented May 6, 2023

Thank you

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