Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Franck Dary
macaon
Commits
31016256
Commit
31016256
authored
Oct 09, 2021
by
Franck Dary
Browse files
Disable parralelism
parent
73971f7c
Changes
3
Hide whitespace changes
Inline
Side-by-side
decoder/src/MacaonDecode.cpp
View file @
31016256
...
...
@@ -129,7 +129,7 @@ int MacaonDecode::main()
{
NeuralNetworkImpl
::
setDevice
(
torch
::
kCPU
);
machine
.
to
(
NeuralNetworkImpl
::
getDevice
());
std
::
for_each
(
std
::
execution
::
par
,
configs
.
begin
(),
configs
.
end
(),
std
::
for_each
(
std
::
execution
::
seq
,
configs
.
begin
(),
configs
.
end
(),
[
&
decoder
,
debug
,
printAdvancement
,
beamSize
,
beamThreshold
](
BaseConfig
&
config
)
{
decoder
.
decode
(
config
,
beamSize
,
beamThreshold
,
debug
,
printAdvancement
);
...
...
trainer/src/MacaonTrain.cpp
View file @
31016256
...
...
@@ -329,7 +329,7 @@ int MacaonTrain::main()
{
NeuralNetworkImpl
::
setDevice
(
torch
::
kCPU
);
machine
.
to
(
NeuralNetworkImpl
::
getDevice
());
std
::
for_each
(
std
::
execution
::
par
,
devConfigs
.
begin
(),
devConfigs
.
end
(),
std
::
for_each
(
std
::
execution
::
seq
,
devConfigs
.
begin
(),
devConfigs
.
end
(),
[
&
decoder
,
debug
,
printAdvancement
](
BaseConfig
&
devConfig
)
{
decoder
.
decode
(
devConfig
,
1
,
0.0
,
debug
,
printAdvancement
);
...
...
trainer/src/Trainer.cpp
View file @
31016256
...
...
@@ -55,7 +55,7 @@ void Trainer::extractExamples(std::vector<SubConfig> & configs, bool debug, std:
NeuralNetworkImpl
::
setDevice
(
torch
::
kCPU
);
machine
.
to
(
NeuralNetworkImpl
::
getDevice
());
std
::
for_each
(
std
::
execution
::
par
,
configs
.
begin
(),
configs
.
end
(),
std
::
for_each
(
std
::
execution
::
seq
,
configs
.
begin
(),
configs
.
end
(),
[
this
,
maxNbExamplesPerFile
,
&
examplesPerState
,
&
totalNbExamples
,
debug
,
memcheck
,
dynamicOracle
,
explorationThreshold
,
dir
,
epoch
,
&
examplesMutex
](
SubConfig
&
config
)
{
config
.
addPredicted
(
machine
.
getPredicted
());
...
...
Write
Preview
Supports
Markdown
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