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
9144f997
Commit
9144f997
authored
5 years ago
by
Franck Dary
Browse files
Options
Downloads
Patches
Plain Diff
addded parameter machine to macaonTrain
parent
86ded225
No related branches found
Branches containing commit
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
+12
-0
12 additions, 0 deletions
trainer/src/MacaonTrain.cpp
with
12 additions
and
0 deletions
trainer/src/MacaonTrain.cpp
+
12
−
0
View file @
9144f997
...
...
@@ -31,6 +31,8 @@ po::options_description MacaonTrain::getOptionsDescription()
"Raw text file of the development corpus"
)
(
"nbEpochs,n"
,
po
::
value
<
int
>
()
->
default_value
(
5
),
"Number of training epochs"
)
(
"machine"
,
po
::
value
<
std
::
string
>
()
->
default_value
(
""
),
"Reading machine file content"
)
(
"help,h"
,
"Produce this help message"
);
desc
.
add
(
req
).
add
(
opt
);
...
...
@@ -91,6 +93,16 @@ int MacaonTrain::main()
bool
debug
=
variables
.
count
(
"debug"
)
==
0
?
false
:
true
;
bool
printAdvancement
=
!
debug
&&
variables
.
count
(
"silent"
)
==
0
?
true
:
false
;
bool
computeDevScore
=
variables
.
count
(
"devScore"
)
==
0
?
false
:
true
;
auto
machineContent
=
variables
[
"machine"
].
as
<
std
::
string
>
();
if
(
!
machineContent
.
empty
())
{
std
::
FILE
*
file
=
fopen
(
machinePath
.
c_str
(),
"w"
);
if
(
!
file
)
util
::
error
(
fmt
::
format
(
"can't open file '{}'
\n
"
,
machinePath
.
c_str
()));
fmt
::
print
(
file
,
"{}"
,
machineContent
);
std
::
fclose
(
file
);
}
fmt
::
print
(
stderr
,
"[{}] Training using device : {}
\n
"
,
util
::
getTime
(),
NeuralNetworkImpl
::
device
.
str
());
...
...
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