libeblearn
|
#include <ebl_basic.h>
Public Member Functions | |
linear_module (parameter< T, Tstate > *p, intg in, intg out, const char *name="linear") | |
virtual | ~linear_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 int | replicable_order () |
order of operation | |
virtual void | forget (forget_param_linear &fp) |
forgetting weights by replacing with random values | |
virtual void | normalize () |
normalize | |
virtual fidxdim | fprop_size (fidxdim &i_size) |
virtual fidxdim | bprop_size (const fidxdim &o_size) |
virtual linear_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 | w |
This module applies a linears combination of the input <in> with its internal weight matrix w and puts the result in the output. This module has a replicable order of 1, if the input has a bigger order, use the replicable version of this module: linear_module_replicable.
ebl::linear_module< T, Tstate >::linear_module | ( | parameter< T, Tstate > * | p, |
intg | in, | ||
intg | out, | ||
const char * | name = "linear" |
||
) |
Constructor.
p | is used to store all parametric variables in a single place. If p is null, a local buffer will be used. |
in | the size of the input to the linear combination. |
out | the size of the output to the linear combination. |
fidxdim ebl::linear_module< T, Tstate >::bprop_size | ( | const fidxdim & | o_size | ) | [virtual] |
Return dimensions compatible with this module given output dimensions. See module_1_1_gen's documentation for more details.
Reimplemented from ebl::module_1_1< T, Tstate >.
linear_module< T, Tstate > * ebl::linear_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::linear_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 >.
fidxdim ebl::linear_module< T, Tstate >::fprop_size | ( | fidxdim & | i_size | ) | [virtual] |
Return dimensions that are compatible with this module. See module_1_1_gen's documentation for more details.
Update output size based on weight dimensions
Reimplemented from ebl::module_1_1< T, Tstate >.