xbresson / spectral_graph_convnets

PyTorch implementation of spectral graph ConvNets, NeurIPS’16
MIT License
291 stars 68 forks source link

something wrong with rescale_L #1

Open tadpole opened 6 years ago

tadpole commented 6 years ago

To rescale Laplacian eigenvalues to [-1, 1], the formula should be $L' = 2L/l_max - I$. I think the 33-th line in corsening.py should be like follows:

L /= lmax / 2
zhujiagang commented 6 years ago

@tadpole Your meaning is right, but your implementation may not be general. Perhaps it's the version of python or numpy that actually matters. I change the original version to L = 2 * L / lmax, a possible version that is applicable to any version of code, the accuracy could achieve 99.080%. But with your version L /= lmax / 2, loss could be nan and accuracy could be around 11%.