pyg-team / pytorch_geometric

Graph Neural Network Library for PyTorch
https://pyg.org
MIT License
21.18k stars 3.64k forks source link

XConv: knn_graph() got an unexpected keyword argument 'num_workers' #1673

Closed chenzhaiyu closed 4 years ago

chenzhaiyu commented 4 years ago

🐛 Bug

To Reproduce

Steps to reproduce the behavior:

  1. Define an XConv layer https://github.com/rusty1s/pytorch_geometric/blob/04143195eaa52dcfa56e8656e72df57c36a76367/benchmark/points/point_cnn.py#L24

  2. The forward operation on this layer throws the error https://github.com/rusty1s/pytorch_geometric/blob/04143195eaa52dcfa56e8656e72df57c36a76367/benchmark/points/point_cnn.py#L37

where pos.shape == torch.Size([960000, 3]) and batch.size = 960000 (tensor([0, 0, 0, ..., 63, 63, 63])).

Error sessage:

...
  File "...\modelPCR.py", line 112, in forward
    x = self.conv1(None, pos, batch)
  File "...\lib\site-packages\torch\nn\modules\module.py", line 532, in __call__
    result = self.forward(*input, **kwargs)
  File "...\lib\site-packages\torch_geometric\nn\conv\x_conv.py", line 127, in forward
    num_workers=self.num_workers)
TypeError: knn_graph() got an unexpected keyword argument 'num_workers'

Process finished with exit code 1

Expected behavior

No error.

Environment

chenzhaiyu commented 4 years ago

Downgrading torch-geometric to 1.5.0 solved the problem.

rusty1s commented 4 years ago

Perfect :)