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
OpenDAS
dlib
Commits
3757fc73
Commit
3757fc73
authored
Dec 04, 2011
by
Davis King
Browse files
Made the order of constructor arguments in the various overloads
for the assignment_function and sequence_labeler consistent.
parent
890d4e53
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
19 additions
and
19 deletions
+19
-19
dlib/svm/assignment_function.h
dlib/svm/assignment_function.h
+6
-6
dlib/svm/assignment_function_abstract.h
dlib/svm/assignment_function_abstract.h
+3
-3
dlib/svm/sequence_labeler.h
dlib/svm/sequence_labeler.h
+4
-4
dlib/svm/sequence_labeler_abstract.h
dlib/svm/sequence_labeler_abstract.h
+2
-2
dlib/svm/structural_assignment_trainer.h
dlib/svm/structural_assignment_trainer.h
+1
-1
dlib/svm/structural_sequence_labeling_trainer.h
dlib/svm/structural_sequence_labeling_trainer.h
+1
-1
dlib/svm/structural_svm_assignment_problem_abstract.h
dlib/svm/structural_svm_assignment_problem_abstract.h
+1
-1
dlib/svm/structural_svm_sequence_labeling_problem_abstract.h
dlib/svm/structural_svm_sequence_labeling_problem_abstract.h
+1
-1
No files found.
dlib/svm/assignment_function.h
View file @
3757fc73
...
...
@@ -54,8 +54,8 @@ namespace dlib
}
assignment_function
(
const
feature_extractor
&
fe
_
,
const
matrix
<
double
,
0
,
1
>&
weights
_
const
matrix
<
double
,
0
,
1
>&
weights
_
,
const
feature_extractor
&
fe
_
)
:
fe
(
fe_
),
weights
(
weights_
),
...
...
@@ -63,7 +63,7 @@ namespace dlib
{
// make sure requires clause is not broken
DLIB_ASSERT
(
fe_
.
num_features
()
==
static_cast
<
unsigned
long
>
(
weights_
.
size
()),
"
\t
assignment_function::assignment_function(
fe_,
weights_)"
"
\t
assignment_function::assignment_function(weights_
,fe_
)"
<<
"
\n\t
These sizes should match"
<<
"
\n\t
fe_.num_features(): "
<<
fe_
.
num_features
()
<<
"
\n\t
weights_.size(): "
<<
weights_
.
size
()
...
...
@@ -72,8 +72,8 @@ namespace dlib
}
assignment_function
(
const
feature_extractor
&
fe_
,
const
matrix
<
double
,
0
,
1
>&
weights_
,
const
feature_extractor
&
fe_
,
bool
force_assignment_
)
:
fe
(
fe_
),
...
...
@@ -82,7 +82,7 @@ namespace dlib
{
// make sure requires clause is not broken
DLIB_ASSERT
(
fe_
.
num_features
()
==
static_cast
<
unsigned
long
>
(
weights_
.
size
()),
"
\t
assignment_function::assignment_function(
fe_,
weights_,force_assignment_)"
"
\t
assignment_function::assignment_function(weights_,
fe_,
force_assignment_)"
<<
"
\n\t
These sizes should match"
<<
"
\n\t
fe_.num_features(): "
<<
fe_
.
num_features
()
<<
"
\n\t
weights_.size(): "
<<
weights_
.
size
()
...
...
@@ -209,7 +209,7 @@ namespace dlib
deserialize
(
weights
,
in
);
deserialize
(
force_assignment
,
in
);
item
=
assignment_function
<
feature_extractor
>
(
fe
,
weights
,
force_assignment
);
item
=
assignment_function
<
feature_extractor
>
(
weights
,
fe
,
force_assignment
);
}
// ----------------------------------------------------------------------------------------
...
...
dlib/svm/assignment_function_abstract.h
View file @
3757fc73
...
...
@@ -161,8 +161,8 @@ namespace dlib
!*/
assignment_function
(
const
feature_extractor
&
fe
,
const
matrix
<
double
,
0
,
1
>&
weights
const
matrix
<
double
,
0
,
1
>&
weights
,
const
feature_extractor
&
fe
);
/*!
requires
...
...
@@ -174,8 +174,8 @@ namespace dlib
!*/
assignment_function
(
const
feature_extractor
&
fe
,
const
matrix
<
double
,
0
,
1
>&
weights
,
const
feature_extractor
&
fe
,
bool
force_assignment
);
/*!
...
...
dlib/svm/sequence_labeler.h
View file @
3757fc73
...
...
@@ -202,15 +202,15 @@ namespace dlib
}
sequence_labeler
(
const
feature_extractor
&
fe
_
,
const
matrix
<
double
,
0
,
1
>&
weights
_
const
matrix
<
double
,
0
,
1
>&
weights
_
,
const
feature_extractor
&
fe
_
)
:
fe
(
fe_
),
weights
(
weights_
)
{
// make sure requires clause is not broken
DLIB_ASSERT
(
fe_
.
num_features
()
==
static_cast
<
unsigned
long
>
(
weights_
.
size
()),
"
\t
sequence_labeler::sequence_labeler(
fe_,
weights_)"
"
\t
sequence_labeler::sequence_labeler(weights_
,fe_
)"
<<
"
\n\t
These sizes should match"
<<
"
\n\t
fe_.num_features(): "
<<
fe_
.
num_features
()
<<
"
\n\t
weights_.size(): "
<<
weights_
.
size
()
...
...
@@ -294,7 +294,7 @@ namespace dlib
deserialize
(
fe
,
in
);
deserialize
(
weights
,
in
);
item
=
sequence_labeler
<
feature_extractor
>
(
fe
,
weights
);
item
=
sequence_labeler
<
feature_extractor
>
(
weights
,
fe
);
}
// ----------------------------------------------------------------------------------------
...
...
dlib/svm/sequence_labeler_abstract.h
View file @
3757fc73
...
...
@@ -221,8 +221,8 @@ namespace dlib
!*/
sequence_labeler
(
const
feature_extractor
&
fe
,
const
matrix
<
double
,
0
,
1
>&
weights
const
matrix
<
double
,
0
,
1
>&
weights
,
const
feature_extractor
&
fe
);
/*!
requires
...
...
dlib/svm/structural_assignment_trainer.h
View file @
3757fc73
...
...
@@ -185,7 +185,7 @@ namespace dlib
solver
(
prob
,
weights
);
return
assignment_function
<
feature_extractor
>
(
fe
,
weights
,
force_assignment
);
return
assignment_function
<
feature_extractor
>
(
weights
,
fe
,
force_assignment
);
}
...
...
dlib/svm/structural_sequence_labeling_trainer.h
View file @
3757fc73
...
...
@@ -182,7 +182,7 @@ namespace dlib
prob
.
set_max_cache_size
(
max_cache_size
);
solver
(
prob
,
weights
);
return
sequence_labeler
<
feature_extractor
>
(
fe
,
weights
);
return
sequence_labeler
<
feature_extractor
>
(
weights
,
fe
);
}
private:
...
...
dlib/svm/structural_svm_assignment_problem_abstract.h
View file @
3757fc73
...
...
@@ -57,7 +57,7 @@ namespace dlib
given labels. In particular, it attempts to learn to predict labels[i]
based on samples[i]. Or in other words, this object can be used to learn
a parameter vector, w, such that an assignment_function declared as:
assignment_function<feature_extractor> assigner(fe
,w
,force_assignment)
assignment_function<feature_extractor> assigner(
w,
fe,force_assignment)
results in an assigner object which attempts to compute the following mapping:
labels[i] == labeler(samples[i])
- This object will use num_threads threads during the optimization
...
...
dlib/svm/structural_svm_sequence_labeling_problem_abstract.h
View file @
3757fc73
...
...
@@ -57,7 +57,7 @@ namespace dlib
given labels. In particular, it attempts to learn to predict labels[i]
based on samples[i]. Or in other words, this object can be used to learn
a parameter vector, w, such that a sequence_labeler declared as:
sequence_labeler<feature_extractor> labeler(fe
,w
)
sequence_labeler<feature_extractor> labeler(
w,
fe)
results in a labeler object which attempts to compute the following mapping:
labels[i] == labeler(samples[i])
- This object will use num_threads threads during the optimization
...
...
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