Hanjun-Dai / GLN

Implementation of Retrosynthesis Prediction with Conditional Graph Logic Network

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

torch-geometric issue

fengjiaxin opened this issue · comments

hello ,thanks to your code and paper ,but i got some errors when i run the code
my environment are follows:
torch 1.4.0
torch-cluster 1.4.5
torch-geometric 1.4.1
torch-scatter 2.0.2
torch-sparse 0.5.0
torch-spline-conv 1.1.1

and when run the commond ./run_mf.sh schneider50k got errors :Traceback (most recent call last):
File "../main.py", line 71, in
main_train()
File "../main.py", line 45, in main_train
loss = graph_path(samples)
File "/home/fengjiaxin/fengjiaxin/anaconda3/envs/my-rdkit-env/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/data1/fengjiaxin/GLN/gln/graph_logic/logic_net.py", line 57, in forward
center_log_prob = self.prod_center_predicate(prods, list_of_list_centers)
File "/home/fengjiaxin/fengjiaxin/anaconda3/envs/my-rdkit-env/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/data1/fengjiaxin/GLN/gln/graph_logic/soft_logic.py", line 203, in forward
list_target_pos=list_target_pos)
File "/data1/fengjiaxin/GLN/gln/graph_logic/soft_logic.py", line 29, in jagged_forward
graph_embed = graph_enc(list_graph)
File "/data1/fengjiaxin/GLN/gln/graph_logic/soft_logic.py", line 200, in
graph_enc=lambda x: self.prod_enc(x)[0],
File "/home/fengjiaxin/fengjiaxin/anaconda3/envs/my-rdkit-env/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/data1/fengjiaxin/GLN/gln/mods/mol_gnn/gnn_family/utils.py", line 45, in forward
embed, nodes_info = self.get_feat(sublist)
File "/data1/fengjiaxin/GLN/gln/mods/mol_gnn/gnn_family/mean_field.py", line 83, in get_feat
return self.readout_net(all_embeds, g_idx, len(graph_list))
File "/home/fengjiaxin/fengjiaxin/anaconda3/envs/my-rdkit-env/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/data1/fengjiaxin/GLN/gln/mods/mol_gnn/gnn_family/utils.py", line 103, in forward
graph_embed = self.readout_agg(out_states, g_idx, dim=0, dim_size=num_graphs)
File "/data1/fengjiaxin/GLN/gln/mods/mol_gnn/gnn_family/utils.py", line 129, in scatter_max
return orig_smax(src, index, dim, out, dim_size, fill_value)[0]
RuntimeError: scatter_max() expected at most 5 argument(s) but received 6 argument(s). Declaration: scatter_max(Tensor src, Tensor index, int dim=-1, Tensor? out=None, int? dim_size=None) -> ((Tensor, Tensor))

can you give some advice to tackle the problem ,thanks a lot

Hi,

The specific versions I was using are:
torch 1.3.1
torch-cluster 1.4.5
torch-geometric 1.3.2
torch-scatter 1.4.0
torch-sparse 0.4.3
torch-spline-conv 1.1.1

Do you mind to rollback and see if that works?

thanks a lot
i solve this issue,but get another issue