Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Lozac'h Loic
otbtf
Commits
e9ed30fb
Commit
e9ed30fb
authored
Jul 31, 2018
by
remi cresson
Browse files
FIX: validation sources in ValidateModelFilter
parent
874f6679
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/otbTensorflowModelTrain.cxx
View file @
e9ed30fb
...
...
@@ -453,10 +453,10 @@ public:
m_ValidateModelFilter
->
SetBatchSize
(
GetParameterInt
(
"training.batchsize"
));
m_ValidateModelFilter
->
SetUserPlaceholders
(
GetUserPlaceholders
(
"validation.userplaceholders"
));
//
T
est
for
(
unsigned
int
i
=
0
;
i
<
m_InputSourcesForT
raining
.
size
()
;
i
++
)
//
Evaluate the metrics against the learning data (t
est
)
for
(
unsigned
int
i
=
0
;
i
<
m_InputSourcesForT
est
.
size
()
;
i
++
)
{
m_
Train
ModelFilter
->
PushBackInputBundle
(
m_InputPlaceholdersForValidation
[
i
],
m_
Validate
ModelFilter
->
PushBackInputBundle
(
m_InputPlaceholdersForValidation
[
i
],
m_InputPatchesSizeForValidation
[
i
],
m_InputSourcesForTest
[
i
]);
}
for
(
unsigned
int
i
=
0
;
i
<
m_TargetTensorsNames
.
size
()
;
i
++
)
...
...
@@ -475,10 +475,10 @@ public:
PrintClassificationMetrics
(
m_ValidateModelFilter
->
GetConfusionMatrix
(
i
),
m_ValidateModelFilter
->
GetMapOfClasses
(
i
));
}
//
V
alidation
for
(
unsigned
int
i
=
0
;
i
<
m_InputSourcesFor
Test
.
size
()
;
i
++
)
//
Evaluate the metrics against the v
alidation
data
for
(
unsigned
int
i
=
0
;
i
<
m_InputSourcesFor
Validation
.
size
()
;
i
++
)
{
m_ValidateModelFilter
->
SetInput
(
i
,
m_InputSourcesFor
Test
[
i
]);
m_ValidateModelFilter
->
SetInput
(
i
,
m_InputSourcesFor
Validation
[
i
]);
}
m_ValidateModelFilter
->
ClearInputReferences
();
for
(
unsigned
int
i
=
0
;
i
<
m_TargetTensorsNames
.
size
()
;
i
++
)
...
...
Write
Preview
Markdown
is supported
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