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
0ee07e46
Commit
0ee07e46
authored
5 years ago
by
Franck Dary
Browse files
Options
Downloads
Patches
Plain Diff
Removed directory dev
parent
3489e388
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+0
-1
0 additions, 1 deletion
CMakeLists.txt
dev/CMakeLists.txt
+0
-8
0 additions, 8 deletions
dev/CMakeLists.txt
dev/src/dev.cpp
+0
-52
0 additions, 52 deletions
dev/src/dev.cpp
with
0 additions
and
61 deletions
CMakeLists.txt
+
0
−
1
View file @
0ee07e46
...
...
@@ -37,7 +37,6 @@ include_directories(utf8)
add_subdirectory
(
fmt
)
add_subdirectory
(
common
)
add_subdirectory
(
dev
)
add_subdirectory
(
reading_machine
)
add_subdirectory
(
torch_modules
)
add_subdirectory
(
trainer
)
...
...
This diff is collapsed.
Click to expand it.
dev/CMakeLists.txt
deleted
100644 → 0
+
0
−
8
View file @
3489e388
FILE
(
GLOB SOURCES src/*.cpp
)
add_executable
(
dev src/dev.cpp
)
target_link_libraries
(
dev common
)
target_link_libraries
(
dev reading_machine
)
target_link_libraries
(
dev torch_modules
)
target_link_libraries
(
dev trainer
)
target_link_libraries
(
dev decoder
)
This diff is collapsed.
Click to expand it.
dev/src/dev.cpp
deleted
100644 → 0
+
0
−
52
View file @
3489e388
#include
<filesystem>
#include
"fmt/core.h"
#include
"util.hpp"
#include
"BaseConfig.hpp"
#include
"SubConfig.hpp"
#include
"TransitionSet.hpp"
#include
"ReadingMachine.hpp"
#include
"Trainer.hpp"
#include
"Decoder.hpp"
int
main
(
int
argc
,
char
*
argv
[])
{
if
(
argc
!=
8
)
{
fmt
::
print
(
stderr
,
"needs 7 arguments.
\n
"
);
exit
(
1
);
}
std
::
string
model
=
argv
[
1
];
std
::
string
mcdFile
=
argv
[
2
];
std
::
string
trainTsvFile
=
argv
[
3
];
std
::
string
trainRawFile
=
""
;
std
::
string
devTsvFile
=
argv
[
5
];
std
::
string
devRawFile
=
""
;
int
nbEpoch
=
std
::
stoi
(
argv
[
7
]);
std
::
filesystem
::
path
modelPath
(
model
);
auto
machinePath
=
modelPath
/
"machine.rm"
;
ReadingMachine
machine
(
machinePath
.
string
());
BaseConfig
goldConfig
(
mcdFile
,
trainTsvFile
,
trainRawFile
);
SubConfig
config
(
goldConfig
);
Trainer
trainer
(
machine
);
trainer
.
createDataset
(
config
);
Decoder
decoder
(
machine
);
BaseConfig
devGoldConfig
(
mcdFile
,
devTsvFile
,
devRawFile
);
for
(
int
i
=
0
;
i
<
nbEpoch
;
i
++
)
{
float
loss
=
trainer
.
epoch
();
auto
devConfig
=
devGoldConfig
;
decoder
.
decode
(
devConfig
,
1
);
decoder
.
evaluate
(
devConfig
,
modelPath
,
devTsvFile
);
fmt
::
print
(
stderr
,
"
\r
{:80}
\r
Epoch {:^9} loss = {:7.2f} dev = {}%
\n
"
,
" "
,
fmt
::
format
(
"{}/{}"
,
i
+
1
,
nbEpoch
),
loss
,
decoder
.
getF1Score
(
"UPOS"
));
}
return
0
;
}
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