-
Notifications
You must be signed in to change notification settings - Fork 283
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
QM9 and SphereNet example error #77
Comments
Hi @yuanqidu, Thanks for your interest in our work. I didn't have this issue. Could you try to replace line 176 to 181
with
Does it solve your problem? Thanks |
Hi @yuanqidu, I also met this issue and believe it's due to the PyTorch version. You can also try to replace line 181 to be
|
Hello, I had this issue and replacing the line 176 and 181 with the above suggestion worked for me.
|
This did not work for me. Neither did the first solution. There is a dependency in spherenet.py line 29 which still causes an error
|
Hi @vinayak2019, Could you please provide more detail about the error? Thanks. Thanks. |
When I replace line 176 to 181 with the suggestion above I get the following error.
In this case I delete the following lines in features.py
The error is expected as When I add lines backs to the file, while still modifying the
If I now set
I don't know how correct that is. I am using |
Hi @vinayak2019, I think for the first solution, you can just remove the "self.dist_emb.reset_parameters()" in spherenet.py line 21 to 24 since the function doesn't need to reset_parameter. For the second solution, could you provide the detailed error output? Yes, you can just clone the code from GitHub since we updated the code after the latest pip install version (0.1.2). Thanks. |
Thanks, @limei0307 The second problem is the PyPI installed version. It is a different dataset that I have this problem, not the QM9. The error is the following.
I debugged the error to line 52-53
The package was installed with
So I clone the repository and |
Hi @vinayak2019, |
Great work!
When I copied the code from the README file and run it with the QM9 dataset provided by DIG, it showed me the following error when I attempt to create a SphereNet model.
Traceback (most recent call last):
File "main_qm9.py", line 19, in
model = SphereNet(energy_and_force=False, cutoff=5.0, num_layers=4,
File "/opt/conda/lib/python3.8/site-packages/dig/threedgraph/method/spherenet/spherenet.py", line 265, in init
self.emb = emb(num_spherical, num_radial, self.cutoff, envelope_exponent)
File "/opt/conda/lib/python3.8/site-packages/dig/threedgraph/method/spherenet/spherenet.py", line 23, in init
self.dist_emb = dist_emb(num_radial, cutoff, envelope_exponent)
File "/opt/conda/lib/python3.8/site-packages/dig/threedgraph/method/spherenet/features.py", line 178, in init
self.reset_parameters()
File "/opt/conda/lib/python3.8/site-packages/dig/threedgraph/method/spherenet/features.py", line 181, in reset_parameters
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.
The text was updated successfully, but these errors were encountered: