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

assert self.lin_edge is not None #1

Closed
WisleyWang opened this issue Jun 14, 2022 · 1 comment
Closed

assert self.lin_edge is not None #1

WisleyWang opened this issue Jun 14, 2022 · 1 comment

Comments

@WisleyWang
Copy link

跑 Gat的minibatch的时候报错

 File "//2022_finvcup_baseline/models/gat_neighsampler.py", line 158, in forward
    x = self.convs[i]((x, x_target), edge_index)
  File "/miniconda3/envs/torch17/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/miniconda3/envs/torch17/lib/python3.7/site-packages/torch_geometric/nn/conv/gatv2_conv.py", line 236, in forward
    size=None)
  File "/miniconda3/envs/torch17/lib/python3.7/site-packages/torch_geometric/nn/conv/message_passing.py", line 317, in propagate
    out = self.message(**msg_kwargs)
  File "/miniconda3/envs/torch17/lib/python3.7/site-packages/torch_geometric/nn/conv/gatv2_conv.py", line 266, in message
    assert self.lin_edge is not None

但是跑 SAG的minibatch是可以正常训练的,这是我用的版本不对吗?

torch-geometric         2.0.4
torch-scatter           2.0.6
torch-sparse            0.6.9

@DGraphXinye
Copy link
Owner

这是pyg版本的原因。
请按照readme Environments中的pyg版本(torch_geometric = 1.7.2),这个报错就会解决。
另外关于安装,如果按照官网指示直接安装pip install torch_geometric,会默认安装最新的版本,需要在pip安装时指明版本。

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