diff options
author | John Langford <jl@jl-desktop.(none)> | 2010-09-05 01:06:31 +0400 |
---|---|---|
committer | John Langford <jl@jl-desktop.(none)> | 2010-09-05 01:06:31 +0400 |
commit | f7388c09c82c6d0440679fab915d2fbcaa25d795 (patch) | |
tree | de60557448e5b9463ac79ed4973e9d577145e659 /simple_label.cc | |
parent | b7ba3f3fa0d5e29f699803892ea1ec1aabba68ca (diff) |
finished implementing backprop, debugging
Diffstat (limited to 'simple_label.cc')
-rw-r--r-- | simple_label.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/simple_label.cc b/simple_label.cc index 30e16670..edf12321 100644 --- a/simple_label.cc +++ b/simple_label.cc @@ -25,6 +25,12 @@ size_t read_cached_simple_label(void* v, io_buf& cache) return total; } +float get_weight(void* v) +{ + label_data* ld = (label_data*) v; + return ld->weight; +} + char* bufcache_simple_label(label_data* ld, char* c) { *(double *)c = ld->label; @@ -47,7 +53,6 @@ void default_simple_label(void* v) label_data* ld = (label_data*) v; ld->label = FLT_MAX; ld->weight = 1.; - ld->undo = false; } void delete_simple_label(void* v) |