Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Find the class that gives the maximum score
- float64_t score = 0, ypred = 0;
- float64_t max_score = df->dense_dot(feat_idx, w.vector, feats_dim);
- for ( int32_t c = 1 ; c < m_num_classes ; ++c )
- {
- score = df->dense_dot(feat_idx, w.vector+c*feats_dim, feats_dim);
- if ( score > max_score )
- {
- max_score = score;
- ypred = c;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement