Skip to content

Commit

Permalink
fix compilation error on arm
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeAkinobu committed Sep 9, 2016
1 parent 1062ae6 commit cf8fcab
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions libsent/src/phmm/calc_dnn.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
#ifdef _WIN32
#include <intrin.h>
#else
#ifndef __arm__
#include <cpuid.h>
#endif
#endif /* _WIN32 */

#include <sent/stddefs.h>
Expand Down Expand Up @@ -626,8 +628,9 @@ void dnn_calc_outprob(HMMWork *wrk)

/* do softmax */
/* INV_LOG_TEN * (x - addlogarray(x)) - log10(state_prior)) */
float logprob = addlog_array(wrk->last_cache, wrk->statenum);
//float logprob = addlog_array(wrk->last_cache, wrk->statenum);
for (i = 0; i < wrk->statenum; i++) {
wrk->last_cache[i] = INV_LOG_TEN * (wrk->last_cache[i] - logprob) - dnn->state_prior[i];
wrk->last_cache[i] = INV_LOG_TEN * wrk->last_cache[i] - dnn->state_prior[i];
// wrk->last_cache[i] = INV_LOG_TEN * (wrk->last_cache[i] - logprob) - dnn->state_prior[i];
}
}

0 comments on commit cf8fcab

Please sign in to comment.