mirror of https://github.com/davisking/dlib.git
Fixed a compile time error that happens on debian's gcc 4.1.2
--HG-- extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%404204
This commit is contained in:
parent
6bc4066acf
commit
2a16d0c811
|
@ -779,7 +779,8 @@ namespace dlib
|
|||
// Rather than doing something like, best_idx = index_of_max(weights*x-b)
|
||||
// we do the following somewhat more complex thing because this supports
|
||||
// both sparse and dense samples.
|
||||
using sparse_vector::dot;
|
||||
using dlib::sparse_vector::dot;
|
||||
using dlib::dot;
|
||||
scalar_type best_val = dot(rowm(weights,0),x) - b(0);
|
||||
unsigned long best_idx = 0;
|
||||
|
||||
|
|
|
@ -164,7 +164,8 @@ namespace dlib
|
|||
- for all i: #dot_prods[i] == dot(colm(#w,0,w.size()-1), samples(i)) - #w(w.size()-1)
|
||||
!*/
|
||||
{
|
||||
using sparse_vector::dot;
|
||||
using dlib::sparse_vector::dot;
|
||||
using dlib::dot;
|
||||
for (long i = 0; i < samples.size(); ++i)
|
||||
dot_prods[i] = dot(colm(w,0,w.size()-1), samples(i)) - w(w.size()-1);
|
||||
|
||||
|
|
|
@ -83,7 +83,8 @@ namespace dlib
|
|||
// figure out which label is the best
|
||||
for (unsigned long i = 0; i < distinct_labels.size(); ++i)
|
||||
{
|
||||
using sparse_vector::dot;
|
||||
using dlib::sparse_vector::dot;
|
||||
using dlib::dot;
|
||||
// perform: temp == dot(relevant part of current solution, samples[idx]) - current_bias
|
||||
scalar_type temp = dot(rowm(current_solution, range(i*dims, (i+1)*dims-2)), samples[idx]) - current_solution((i+1)*dims-1);
|
||||
|
||||
|
|
Loading…
Reference in New Issue