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
a9df4b41
"vscode:/vscode.git/clone" did not exist on "82c8b9f8eeffc1b9a72dc5a84137ece88e8d5941"
Unverified
Commit
a9df4b41
authored
Apr 09, 2019
by
Gao, Xiang
Committed by
GitHub
Apr 09, 2019
Browse files
reduce time on neurochem trainer on CI (#208)
parent
276a886d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
tests/test_data/inputtrain.ipt
tests/test_data/inputtrain.ipt
+1
-1
tests/test_data/inputtrain.yaml
tests/test_data/inputtrain.yaml
+1
-1
torchani/neurochem/__init__.py
torchani/neurochem/__init__.py
+8
-1
No files found.
tests/test_data/inputtrain.ipt
View file @
a9df4b41
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
sflparamsfile=rHCNO-5.2R_16-3.5A_a4-8.params
sflparamsfile=rHCNO-5.2R_16-3.5A_a4-8.params
ntwkStoreDir=networks/
ntwkStoreDir=networks/
atomEnergyFile=sae_linfit.dat
atomEnergyFile=sae_linfit.dat
nmax=0! Maximum number of iterations (0 = inf)
nmax=
1
0! Maximum number of iterations (0 = inf)
tolr=1! Tolerance - early stopping
tolr=1! Tolerance - early stopping
emult=0.1!Multiplier by eta after tol switch
emult=0.1!Multiplier by eta after tol switch
eta=0.001! Eta -- Learning rate
eta=0.001! Eta -- Learning rate
...
...
tests/test_data/inputtrain.yaml
View file @
a9df4b41
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
sflparamsfile
:
'
rHCNO-5.2R_16-3.5A_a4-8.params'
sflparamsfile
:
'
rHCNO-5.2R_16-3.5A_a4-8.params'
ntwkStoreDir
:
'
networks/'
ntwkStoreDir
:
'
networks/'
atomEnergyFile
:
'
sae_linfit.dat'
atomEnergyFile
:
'
sae_linfit.dat'
nmax
:
0
# Maximum number of iterations (0 = inf)
nmax
:
1
0
# Maximum number of iterations (0 = inf)
tolr
:
1
# Tolerance - early stopping
tolr
:
1
# Tolerance - early stopping
emult
:
0.1
# Multiplier by eta after tol switch
emult
:
0.1
# Multiplier by eta after tol switch
eta
:
0.001
# Eta -- Learning rate
eta
:
0.001
# Eta -- Learning rate
...
...
torchani/neurochem/__init__.py
View file @
a9df4b41
...
@@ -556,7 +556,6 @@ if sys.version_info[0] > 2:
...
@@ -556,7 +556,6 @@ if sys.version_info[0] > 2:
assert_param
(
'runtype'
,
'ANNP_CREATE_HDNN_AND_TRAIN'
)
assert_param
(
'runtype'
,
'ANNP_CREATE_HDNN_AND_TRAIN'
)
assert_param
(
'adptlrn'
,
'OFF'
)
assert_param
(
'adptlrn'
,
'OFF'
)
assert_param
(
'tmax'
,
0
)
assert_param
(
'tmax'
,
0
)
assert_param
(
'nmax'
,
0
)
assert_param
(
'ntwshr'
,
0
)
assert_param
(
'ntwshr'
,
0
)
# load parameters
# load parameters
...
@@ -585,6 +584,8 @@ if sys.version_info[0] > 2:
...
@@ -585,6 +584,8 @@ if sys.version_info[0] > 2:
del
params
[
'tbtchsz'
]
del
params
[
'tbtchsz'
]
self
.
validation_batch_size
=
params
[
'vbtchsz'
]
self
.
validation_batch_size
=
params
[
'vbtchsz'
]
del
params
[
'vbtchsz'
]
del
params
[
'vbtchsz'
]
self
.
nmax
=
params
[
'nmax'
]
del
params
[
'nmax'
]
# construct networks
# construct networks
input_size
,
network_setup
=
network_setup
input_size
,
network_setup
=
network_setup
...
@@ -700,6 +701,12 @@ if sys.version_info[0] > 2:
...
@@ -700,6 +701,12 @@ if sys.version_info[0] > 2:
self
.
global_epoch
=
trainer
.
state
.
epoch
self
.
global_epoch
=
trainer
.
state
.
epoch
self
.
global_iteration
=
trainer
.
state
.
iteration
self
.
global_iteration
=
trainer
.
state
.
iteration
if
self
.
nmax
>
0
:
@
trainer
.
on
(
ignite
.
engine
.
Events
.
EPOCH_COMPLETED
)
def
terminate_when_nmax_reaches
(
trainer
):
if
trainer
.
state
.
epoch
>=
self
.
nmax
:
trainer
.
terminate
()
if
self
.
tqdm
is
not
None
:
if
self
.
tqdm
is
not
None
:
@
trainer
.
on
(
ignite
.
engine
.
Events
.
EPOCH_STARTED
)
@
trainer
.
on
(
ignite
.
engine
.
Events
.
EPOCH_STARTED
)
def
init_tqdm
(
trainer
):
def
init_tqdm
(
trainer
):
...
...
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