divelab / DIG

A library for graph deep learning research
https://diveintographs.readthedocs.io/
GNU General Public License v3.0
1.84k stars 281 forks source link

RuntimeError: a leaf Variable that requires grad is being used in an in-place operation. #103

Closed tanyingjia closed 2 years ago

tanyingjia commented 2 years ago

When I run the 3D Diagram tutorial, an error occurs. I don't know how to use it.

Traceback (most recent call last): File "D:\rubbihs\pyg\mol\3d\qm9.py", line 14, in model = SphereNet(energy_and_force=False, cutoff=5.0, num_layers=4, File "D:\down\anaconda\envs\pyg\lib\site-packages\dig\threedgraph\method\spherenet\spherenet.py", line 265, in init self.emb = emb(num_spherical, num_radial, self.cutoff, envelope_exponent) File "D:\down\anaconda\envs\pyg\lib\site-packages\dig\threedgraph\method\spherenet\spherenet.py", line 23, in init self.dist_emb = dist_emb(num_radial, cutoff, envelope_exponent) File "D:\down\anaconda\envs\pyg\lib\site-packages\dig\threedgraph\method\spherenet\features.py", line 178, in init self.reset_parameters() File "D:\down\anaconda\envs\pyg\lib\site-packages\dig\threedgraph\method\spherenet\features.py", line 181, in resetparameters torch.arange(1, self.freq.numel() + 1, out=self.freq).mul(PI) RuntimeError: a leaf Variable that requires grad is being used in an in-place operation.

limei0307 commented 2 years ago

Hi @tanyingjia, please see issue #77. Thanks.