Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
28b09047
Unverified
Commit
28b09047
authored
Jul 06, 2022
by
Chang Liu
Committed by
GitHub
Jul 07, 2022
Browse files
[Example][Bugfix] Fix dimenet example (#4219)
Co-authored-by:
Xin Yao
<
xiny@nvidia.com
>
parent
9ee7ced5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
examples/pytorch/dimenet/modules/bessel_basis_layer.py
examples/pytorch/dimenet/modules/bessel_basis_layer.py
+4
-2
No files found.
examples/pytorch/dimenet/modules/bessel_basis_layer.py
View file @
28b09047
...
@@ -17,7 +17,9 @@ class BesselBasisLayer(nn.Module):
...
@@ -17,7 +17,9 @@ class BesselBasisLayer(nn.Module):
self
.
reset_params
()
self
.
reset_params
()
def
reset_params
(
self
):
def
reset_params
(
self
):
with
torch
.
no_grad
():
torch
.
arange
(
1
,
self
.
frequencies
.
numel
()
+
1
,
out
=
self
.
frequencies
).
mul_
(
np
.
pi
)
torch
.
arange
(
1
,
self
.
frequencies
.
numel
()
+
1
,
out
=
self
.
frequencies
).
mul_
(
np
.
pi
)
self
.
frequencies
.
requires_grad_
()
def
forward
(
self
,
g
):
def
forward
(
self
,
g
):
d_scaled
=
g
.
edata
[
'd'
]
/
self
.
cutoff
d_scaled
=
g
.
edata
[
'd'
]
/
self
.
cutoff
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment