diff options
author | John Langford <jl@nyclamp.(none)> | 2013-10-26 00:02:02 +0400 |
---|---|---|
committer | John Langford <jl@nyclamp.(none)> | 2013-10-26 00:02:02 +0400 |
commit | 4fd66a0d879f5d027ad604ea31af55acef828ac4 (patch) | |
tree | 8d89c4ae7aac7d9b81d35165d23afa032119f01f /vowpalwabbit/gd_mf.cc | |
parent | 87f55a7a0aa159c9a3a061bfc3c91880155509c7 (diff) |
standardizing driver
Diffstat (limited to 'vowpalwabbit/gd_mf.cc')
-rw-r--r-- | vowpalwabbit/gd_mf.cc | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/vowpalwabbit/gd_mf.cc b/vowpalwabbit/gd_mf.cc index 734e26e9..a8f06036 100644 --- a/vowpalwabbit/gd_mf.cc +++ b/vowpalwabbit/gd_mf.cc @@ -289,28 +289,10 @@ float mf_predict(vw& all, example* ex) void finish(void* d) { } - void drive(vw* all, void* d) -{ - example* ec = NULL; - - while ( true ) - { - if ((ec = VW::get_example(all->p)) != NULL)//blocking operation. - { - learn(d,ec); - return_simple_example(*all, ec); - } - else if (parser_done(all->p)) - return; - else - ;//busywait when we have predicted on all examples but not yet trained on all. - } -} - learner setup(vw& all) { sl_t sl = {&all, save_load}; - learner l(&all,drive,learn,finish,sl); + learner l(&all,LEARNER::driver,learn,finish,sl); return l; } } |