|
libeblearn
|
#include <ebl_answer.h>
Public Member Functions | |
| answer_module (uint nfeatures, const char *name="answer_module") | |
| virtual void | fprop (Tstate &in, Tstate &out) |
| virtual void | fprop (labeled_datasource< T, Tds1, Tds2 > &ds, Tstate &out) |
| Produce target matrix into 'out' for training, given a datasource 'ds'. | |
| virtual void | bprop (labeled_datasource< T, Tds1, Tds2 > &ds, Tstate &out) |
| virtual void | bbprop (labeled_datasource< T, Tds1, Tds2 > &ds, Tstate &out) |
| virtual void | fprop (labeled_datasource< T, Tds1, Tds2 > &ds, mstate< Tstate > &out) |
| Produce target matrix into 'out' for training, given a datasource 'ds'. | |
| virtual void | bprop (labeled_datasource< T, Tds1, Tds2 > &ds, mstate< Tstate > &out) |
| virtual void | bbprop (labeled_datasource< T, Tds1, Tds2 > &ds, mstate< Tstate > &out) |
| virtual bool | correct (Tstate &answer, Tstate &label) |
| virtual void | update_log (classifier_meter &log, intg age, idx< T > &energy, idx< T > &answer, idx< T > &label, idx< T > &target, idx< T > &rawout) |
| Update the 'log' according to this type of answer module. | |
| virtual void | forget (forget_param_linear &fp) |
| forgetting weights by replacing with random values | |
| virtual std::string | describe () |
| Returns a string describing this module and its parameters. | |
| virtual uint | get_nfeatures () |
| Returns the number of features expected as inputs. | |
Protected Attributes | |
| uint | nfeatures |
| Number of input features. | |
A generic class describing a module that can be put on top of a network and transform its output into answers, such as class and confidence. It can also be used to produce target inputs for training given a datasource object.
| void ebl::answer_module< T, Tds1, Tds2, Tstate >::bbprop | ( | labeled_datasource< T, Tds1, Tds2 > & | ds, |
| Tstate & | out | ||
| ) | [virtual] |
Back-propagates 2nd derivatives. This might be useful if answer module has learnable internal parameters.
| void ebl::answer_module< T, Tds1, Tds2, Tstate >::bbprop | ( | labeled_datasource< T, Tds1, Tds2 > & | ds, |
| mstate< Tstate > & | out | ||
| ) | [virtual] |
Back-propagates 2nd derivatives. This might be useful if answer module has learnable internal parameters.
| void ebl::answer_module< T, Tds1, Tds2, Tstate >::bprop | ( | labeled_datasource< T, Tds1, Tds2 > & | ds, |
| Tstate & | out | ||
| ) | [virtual] |
Back-propagates gradients. This might be useful if answer module has learnable internal parameters.
| void ebl::answer_module< T, Tds1, Tds2, Tstate >::bprop | ( | labeled_datasource< T, Tds1, Tds2 > & | ds, |
| mstate< Tstate > & | out | ||
| ) | [virtual] |
Back-propagates gradients. This might be useful if answer module has learnable internal parameters.
| bool ebl::answer_module< T, Tds1, Tds2, Tstate >::correct | ( | Tstate & | answer, |
| Tstate & | label | ||
| ) | [virtual] |
Returns true if 'answer' matches with 'label'.
Reimplemented in ebl::class_answer< T, Tds1, Tds2, Tstate >, and ebl::regression_answer< T, Tds1, Tds2, Tstate >.
| void ebl::answer_module< T, Tds1, Tds2, Tstate >::fprop | ( | Tstate & | in, |
| Tstate & | out | ||
| ) | [virtual] |
Produce a vector of answers given input 'in'. e.g. 'out' contains answers in this order: class id, confidence.
Reimplemented from ebl::module_1_1< T, Tstate >.
Reimplemented in ebl::class_answer< T, Tds1, Tds2, Tstate >, ebl::scalerclass_answer< T, Tds1, Tds2, Tstate >, ebl::scaler_answer< T, Tds1, Tds2, Tstate >, ebl::regression_answer< T, Tds1, Tds2, Tstate >, and ebl::vote_answer< T, Tds1, Tds2, Tstate >.