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
5b546740
Commit
5b546740
authored
5 years ago
by
Franck Dary
Browse files
Options
Downloads
Patches
Plain Diff
Reduced subconfig span to save memory
parent
78a246d7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dev/src/dev.cpp
+6
-4
6 additions, 4 deletions
dev/src/dev.cpp
reading_machine/include/SubConfig.hpp
+1
-1
1 addition, 1 deletion
reading_machine/include/SubConfig.hpp
with
7 additions
and
5 deletions
dev/src/dev.cpp
+
6
−
4
View file @
5b546740
...
@@ -27,7 +27,7 @@ int main(int argc, char * argv[])
...
@@ -27,7 +27,7 @@ int main(int argc, char * argv[])
config
.
setState
(
machine
.
getStrategy
().
getInitialState
());
config
.
setState
(
machine
.
getStrategy
().
getInitialState
());
config
.
printForDebug
(
stderr
)
;
std
::
vector
<
std
::
pair
<
SubConfig
,
Transition
*>>
trainingExamples
;
while
(
true
)
while
(
true
)
{
{
...
@@ -35,8 +35,10 @@ int main(int argc, char * argv[])
...
@@ -35,8 +35,10 @@ int main(int argc, char * argv[])
if
(
!
transition
)
if
(
!
transition
)
util
::
myThrow
(
"No transition appliable !"
);
util
::
myThrow
(
"No transition appliable !"
);
fmt
::
print
(
stderr
,
"Transition : {}
\n
"
,
transition
->
getName
());
trainingExamples
.
emplace_back
(
config
,
transition
);
transition
->
apply
(
config
);
transition
->
apply
(
config
);
config
.
addToHistory
(
transition
->
getName
());
auto
movement
=
machine
.
getStrategy
().
getMovement
(
config
,
transition
->
getName
());
auto
movement
=
machine
.
getStrategy
().
getMovement
(
config
,
transition
->
getName
());
if
(
movement
==
Strategy
::
endMovement
)
if
(
movement
==
Strategy
::
endMovement
)
...
@@ -48,10 +50,10 @@ int main(int argc, char * argv[])
...
@@ -48,10 +50,10 @@ int main(int argc, char * argv[])
if
(
config
.
needsUpdate
())
if
(
config
.
needsUpdate
())
config
.
update
();
config
.
update
();
config
.
printForDebug
(
stderr
);
}
}
trainingExamples
[
10000
].
first
.
printForDebug
(
stderr
);
return
0
;
return
0
;
}
}
This diff is collapsed.
Click to expand it.
reading_machine/include/SubConfig.hpp
+
1
−
1
View file @
5b546740
...
@@ -8,7 +8,7 @@ class SubConfig : public Config
...
@@ -8,7 +8,7 @@ class SubConfig : public Config
{
{
private
:
private
:
static
constexpr
std
::
size_t
spanSize
=
10
0
;
static
constexpr
std
::
size_t
spanSize
=
5
0
;
private
:
private
:
...
...
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