libeblearn
|
#include <ebl_basic.h>
Public Member Functions | |
addc_module (parameter< T, Tstate > *p, intg size, const char *name="addc") | |
virtual | ~addc_module () |
destructor | |
virtual void | fprop (Tstate &in, Tstate &out) |
forward propagation from in to out | |
virtual void | bprop (Tstate &in, Tstate &out) |
backward propagation from out to in | |
virtual void | bbprop (Tstate &in, Tstate &out) |
second-derivative backward propagation from out to in | |
virtual void | forget (forget_param_linear &fp) |
forgetting weights by replacing with random values | |
virtual addc_module< T, Tstate > * | copy (parameter< T, Tstate > *p=NULL) |
virtual void | load_x (idx< T > &weights) |
Copy passed weights into x component of internal weights. | |
virtual std::string | describe () |
Returns a string describing this module and its parameters. | |
virtual void | dump_fprop (Tstate &in, Tstate &out) |
Public Attributes | |
Tstate | bias |
the biases |
The constant add module adds biases to the first dimension of the input and puts the results in the output. This module is spatially replicable (the input can have an order greater than 1 and the operation will apply to all elements).
ebl::addc_module< T, Tstate >::addc_module | ( | parameter< T, Tstate > * | p, |
intg | size, | ||
const char * | name = "addc" |
||
) |
Constructor.
p | is used to store all parametric variables in a single place. If p is null, a local buffer will be used. |
size | is the number of biases, or the size of dimensions 0 of inputs and outputs. |
addc_module< T, Tstate > * ebl::addc_module< T, Tstate >::copy | ( | parameter< T, Tstate > * | p = NULL | ) | [virtual] |
Returns a deep copy of this module.
p | If NULL, reuse current parameter space, otherwise allocate new weights on parameter 'p'. |
Reimplemented from ebl::module_1_1< T, Tstate >.
void ebl::addc_module< T, Tstate >::dump_fprop | ( | Tstate & | in, |
Tstate & | out | ||
) | [virtual] |
Calls fprop and then dumps internal buffers, inputs and outputs into files. This can be useful for debugging.
Reimplemented from ebl::module_1_1< T, Tstate >.