Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2012
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1.     // Find the class that gives the maximum score
  2.  
  3.     float64_t score = 0, ypred = 0;
  4.     float64_t max_score = df->dense_dot(feat_idx, w.vector, feats_dim);
  5.  
  6.     for ( int32_t c = 1 ; c < m_num_classes ; ++c )
  7.     {
  8.         score = df->dense_dot(feat_idx, w.vector+c*feats_dim, feats_dim);
  9.  
  10.         if ( score > max_score )
  11.         {
  12.             max_score = score;
  13.             ypred = c;
  14.         }
  15.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement