diff options
author | U-NORTHAMERICA\jcl <jcl@JCL.northamerica.corp.microsoft.com> | 2013-12-31 00:04:09 +0400 |
---|---|---|
committer | U-NORTHAMERICA\jcl <jcl@JCL.northamerica.corp.microsoft.com> | 2013-12-31 00:04:09 +0400 |
commit | 2c324f48de25d87dc579f0d048ee0fe04a264020 (patch) | |
tree | da19244ba4ceb1386d6c8c3eb35c3298f3109f79 /vowpalwabbit/lrq.cc | |
parent | b32e253b7b88637235c73b01f84b18d89c2c59db (diff) |
fix some vs compile issues
Diffstat (limited to 'vowpalwabbit/lrq.cc')
-rw-r--r-- | vowpalwabbit/lrq.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vowpalwabbit/lrq.cc b/vowpalwabbit/lrq.cc index a6ee808f..3a6c7eb9 100644 --- a/vowpalwabbit/lrq.cc +++ b/vowpalwabbit/lrq.cc @@ -80,7 +80,7 @@ namespace LRQ { unsigned int maxiter = (all.training && ! example_is_test (ec)) ? 2 : 1; bool do_dropout = lrq->dropout && all.training && ! example_is_test (ec); - float scale = (! lrq->dropout || do_dropout) ? 1 : 0.5; + float scale = (! lrq->dropout || do_dropout) ? 1.f : 0.5f; for (unsigned int iter = 0; iter < maxiter; ++iter, ++which) { @@ -107,7 +107,7 @@ namespace LRQ { { if (! do_dropout || cheesyrbit (lrq->seed)) { - uint32_t lwindex = lindex + n * all.reg.stride; + uint32_t lwindex = (uint32_t)(lindex + n * all.reg.stride); float* lw = &all.reg.weight_vector[lwindex & all.reg.weight_mask]; @@ -124,7 +124,7 @@ namespace LRQ { // NB: ec->ft_offset added by base learner float rfx = rf->x; size_t rindex = rf->weight_index; - uint32_t rwindex = rindex + n * all.reg.stride; + uint32_t rwindex = (uint32_t)(rindex + n * all.reg.stride); feature lrq; lrq.x = scale * *lw * lfx * rfx; |