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
torchani
Commits
48eeb3dc
"src/vscode:/vscode.git/clone" did not exist on "61ea57c5a712b862a88c387892b5a25dfc504b4a"
Commit
48eeb3dc
authored
Jul 04, 2019
by
Gao, Xiang
Committed by
Farhad Ramezanghorbani
Jul 04, 2019
Browse files
Scale by sqrt(natoms) instead of natoms (#259)
parent
74ea32b9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/nnp_training.py
examples/nnp_training.py
+1
-1
No files found.
examples/nnp_training.py
View file @
48eeb3dc
...
@@ -331,7 +331,7 @@ for _ in range(scheduler.last_epoch + 1, max_epochs):
...
@@ -331,7 +331,7 @@ for _ in range(scheduler.last_epoch + 1, max_epochs):
predicted_energies
.
append
(
chunk_energies
)
predicted_energies
.
append
(
chunk_energies
)
num_atoms
=
torch
.
cat
(
num_atoms
).
to
(
true_energies
.
dtype
)
num_atoms
=
torch
.
cat
(
num_atoms
).
to
(
true_energies
.
dtype
)
predicted_energies
=
torch
.
cat
(
predicted_energies
)
predicted_energies
=
torch
.
cat
(
predicted_energies
)
loss
=
(
mse
(
predicted_energies
,
true_energies
)
/
num_atoms
).
mean
()
loss
=
(
mse
(
predicted_energies
,
true_energies
)
/
num_atoms
.
sqrt
()
).
mean
()
optimizer
.
zero_grad
()
optimizer
.
zero_grad
()
loss
.
backward
()
loss
.
backward
()
optimizer
.
step
()
optimizer
.
step
()
...
...
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