libeblearn
ebl::power_module< T, Tstate > Class Template Reference

#include <ebl_basic.h>

Inheritance diagram for ebl::power_module< T, Tstate >:
ebl::module_1_1< T, Tstate > ebl::module

List of all members.

Public Member Functions

 power_module (T p)
virtual ~power_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

Detailed Description

template<typename T, class Tstate = bbstate_idx<T>>
class ebl::power_module< T, Tstate >

x^p module. p can be nay real number the derivatives are implemented using polynomial derivative rules, so they are exact The derivative implementation divides output by input to get x^(p-1), therefore this module assumes that the :input:x and :output:x is not modified until bprop


Constructor & Destructor Documentation

template<typename T , class Tstate >
ebl::power_module< T, Tstate >::power_module ( p)

is double number, every element of input is raised to its

th power.


Member Function Documentation

template<typename T , class Tstate >
void ebl::power_module< T, Tstate >::bbprop ( Tstate &  in,
Tstate &  out 
) [virtual]

second-derivative backward propagation from out to in

tt = (x^(p-1))^2

tt = outddx*(x^(p-1))^2

Reimplemented from ebl::module_1_1< T, Tstate >.

template<typename T , class Tstate >
void ebl::power_module< T, Tstate >::bprop ( Tstate &  in,
Tstate &  out 
) [virtual]

backward propagation from out to in

tt = outdx*x^(p-1)

Reimplemented from ebl::module_1_1< T, Tstate >.


The documentation for this class was generated from the following files: