Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
macaon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Franck Dary
macaon
Commits
a8613b8b
Commit
a8613b8b
authored
4 years ago
by
Franck Dary
Browse files
Options
Downloads
Patches
Plain Diff
Improved model selection when using dynamic oracle
parent
f2e0e3da
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
trainer/src/MacaonTrain.cpp
+3
-4
3 additions, 4 deletions
trainer/src/MacaonTrain.cpp
with
3 additions
and
4 deletions
trainer/src/MacaonTrain.cpp
+
3
−
4
View file @
a8613b8b
...
...
@@ -82,7 +82,6 @@ int MacaonTrain::main()
auto
nbEpoch
=
variables
[
"nbEpochs"
].
as
<
int
>
();
auto
batchSize
=
variables
[
"batchSize"
].
as
<
int
>
();
auto
dynamicOracleInterval
=
variables
[
"dynamicOracleInterval"
].
as
<
int
>
();
bool
saveEverything
=
dynamicOracleInterval
>
0
;
auto
rarityThreshold
=
variables
[
"rarityThreshold"
].
as
<
float
>
();
bool
debug
=
variables
.
count
(
"debug"
)
==
0
?
false
:
true
;
bool
printAdvancement
=
!
debug
&&
variables
.
count
(
"silent"
)
==
0
?
true
:
false
;
...
...
@@ -145,9 +144,9 @@ int MacaonTrain::main()
if
(
buffer
!=
std
::
fgets
(
buffer
,
1024
,
f
))
break
;
float
devScoreMean
=
std
::
stof
(
util
::
split
(
buffer
,
'\t'
).
back
());
if
(
computeDevScore
and
devScoreMean
>
bestDevScore
)
if
(
computeDevScore
and
(
devScoreMean
>
bestDevScore
or
currentEpoch
==
dynamicOracleInterval
)
)
bestDevScore
=
devScoreMean
;
if
(
!
computeDevScore
and
devScoreMean
<
bestDevScore
)
if
(
!
computeDevScore
and
(
devScoreMean
<
bestDevScore
or
currentEpoch
==
dynamicOracleInterval
)
)
bestDevScore
=
devScoreMean
;
currentEpoch
++
;
}
...
...
@@ -204,7 +203,7 @@ int MacaonTrain::main()
if
(
!
computeDevScore
)
saved
=
devScoreMean
<=
bestDevScore
;
if
(
saveEverything
)
if
(
currentEpoch
==
dynamicOracleInterval
)
saved
=
true
;
if
(
saved
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment