Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/vowpal_wabbit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Langford <jl@hunch.net>2014-04-17 01:01:02 +0400
committerJohn Langford <jl@hunch.net>2014-04-17 01:01:02 +0400
commit209464f4bffbca471da67c47cd7e1f0b75486427 (patch)
tree21c313a73523ad2b935cdb008fc9c3e6c5ca54a3 /vowpalwabbit/mf.cc
parent64c949aeb0e93087f0df308366aa985567baa94a (diff)
change stride to stride_shift
Diffstat (limited to 'vowpalwabbit/mf.cc')
-rw-r--r--vowpalwabbit/mf.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/vowpalwabbit/mf.cc b/vowpalwabbit/mf.cc
index d5cf542b..52cec6aa 100644
--- a/vowpalwabbit/mf.cc
+++ b/vowpalwabbit/mf.cc
@@ -194,8 +194,8 @@ learner* setup(vw& all, po::variables_map& vm) {
// initialize weights randomly
if(!vm.count("initial_regressor"))
{
- for (size_t j = 0; j < (all.reg.weight_mask + 1) / all.reg.stride; j++)
- all.reg.weight_vector[j*all.reg.stride] = (float) (0.1 * frand48());
+ for (size_t j = 0; j < (all.reg.weight_mask + 1) >> all.reg.stride_shift; j++)
+ all.reg.weight_vector[j << all.reg.stride_shift] = (float) (0.1 * frand48());
}
learner* l = new learner(data, all.l, 2*data->rank+1);
l->set_learn<mf, learn>();