RuntimeError: the derivative for 'index' is not implemented
youjin-c opened this issue · comments
Youjin C. commented
Hello,
I was running the example and got this error.
python src/main.py
+---------------------+----------------------------+
| Parameter | Value |
+=====================+============================+
| Approximation order | 20 |
+---------------------+----------------------------+
| Dropout | 0.500 |
+---------------------+----------------------------+
| Edge path | ./input/cora_edges.csv |
+---------------------+----------------------------+
| Epochs | 300 |
+---------------------+----------------------------+
| Features path | ./input/cora_features.json |
+---------------------+----------------------------+
| Filters | 16 |
+---------------------+----------------------------+
| Learning rate | 0.001 |
+---------------------+----------------------------+
| Log path | ./logs/cora_logs.json |
+---------------------+----------------------------+
| Scale | 1 |
+---------------------+----------------------------+
| Seed | 42 |
+---------------------+----------------------------+
| Target path | ./input/cora_target.csv |
+---------------------+----------------------------+
| Test size | 0.200 |
+---------------------+----------------------------+
| Tolerance | 0.000 |
+---------------------+----------------------------+
| Weight decay | 0.001 |
+---------------------+----------------------------+
Wavelet calculation and sparsification started.
100%|███████████████████████████████████████████████████████████████████████████████████| 2708/2708 [00:11<00:00, 237.23it/s]
100%|███████████████████████████████████████████████████████████████████████████████████| 2708/2708 [00:11<00:00, 228.91it/s]
Normalizing the sparsified wavelets.
Density of wavelets: 0.2%.
Density of inverse wavelets: 0.04%.
Training.
Loss: 0%| | 0/300 [00:00<?, ?it/s]Traceback (most recent call last):
File "src/main.py", line 24, in <module>
main()
File "src/main.py", line 18, in main
trainer.fit()
File "/home/paperspace/Thesis/GraphWaveletNeuralNetwork/src/gwnn.py", line 131, in fit
prediction = self.model(self.phi_indices, self.phi_values , self.phi_inverse_indices, self.phi_inverse_values, self.feature_indices, self.feature_values)
File "/home/paperspace/miniconda2/envs/thesis/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in __call__
result = self.forward(*input, **kwargs)
File "/home/paperspace/Thesis/GraphWaveletNeuralNetwork/src/gwnn.py", line 44, in forward
deep_features_1 = self.convolution_1(phi_indices, phi_values, phi_inverse_indices, phi_inverse_values, feature_indices, feature_values, self.args.dropout)
File "/home/paperspace/miniconda2/envs/thesis/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in __call__
result = self.forward(*input, **kwargs)
File "/home/paperspace/Thesis/GraphWaveletNeuralNetwork/src/gwnn_layer.py", line 55, in forward
localized_features = spmm(phi_product_indices, phi_product_values, self.ncount, filtered_features)
File "/home/paperspace/miniconda2/envs/thesis/lib/python3.6/site-packages/torch_sparse/spmm.py", line 21, in spmm
out = scatter_add(out, row, dim=0, dim_size=m)
File "/home/paperspace/miniconda2/envs/thesis/lib/python3.6/site-packages/torch_scatter/add.py", line 73, in scatter_add
return out.scatter_add_(dim, index, src)
RuntimeError: the derivative for 'index' is not implemented
Benedek Rozemberczki commented
Your PyTorch Geometric version might be different.