chao1224 / MoleculeSTM

Multi-modal Molecule Structure-text Model for Text-based Editing and Retrieval, Nat Mach Intell 2023 (https://www.nature.com/articles/s42256-023-00759-6)
https://chao1224.github.io/MoleculeSTM
Other
188 stars 18 forks source link

4.3 Downstream: Zero-shot Text-based Molecule Editing #5

Closed cyz-32526 closed 8 months ago

cyz-32526 commented 8 months ago

在使用指令python downstream_02_molecule_edit_step_01_MoleculeSTM_Space_Alignment.py \ --MoleculeSTM_molecule_type=Graph \ --MoleculeSTM_model_dir=../data/demo/demo_checkpoints_Graph 运行MoleculeSTM-Graph编辑任务的时候出现了如下报错。

RuntimeError: Error(s) in loading state_dict for GNN_graphpred: size mismatch for molecule_node_model.atom_encoder.atom_embedding_list.1.weight: copying a param with shape torch.Size([4, 300]) from checkpoint, the shape in current model is torch.Size([5, 300]). 请问这个该怎么解决啊~

chao1224 commented 8 months ago

Hi @cyz-001, 你那里有更完整的报错信息么?

现在看起来报错的代码是这一行 layer定义和checkpoint的layer shape不一致。你的OGB版本是多少?

cyz-32526 commented 8 months ago

谢谢你的回复!我降低了OGB版本到1.2,问题得到了解决。非常感谢你的建议!~