libeblearn
ebl::codec< T > Class Template Reference

#include <ebl_codec.h>

Inheritance diagram for ebl::codec< T >:
ebl::ebm_2< T > ebl::module ebl::codec_lone< T >

List of all members.

Public Member Functions

 codec (module_1_1< T > &encoder_, ebm_2< T > &enc_cost_, double weight_energy_enc_, ebm_1< T > &z_cost_, double weight_energy_z_, module_1_1< T > &decoder_, ebm_2< T > &dec_cost_, double weight_energy_dec_, gd_param &infp_)
 Constructor.
virtual ~codec ()
 destructor.
virtual void fprop (fstate_idx< T > &in1, fstate_idx< T > &in2, fstate_idx< T > &energy)
 forward propagation of in1 and in2
virtual void bprop (fstate_idx< T > &in1, fstate_idx< T > &in2, fstate_idx< T > &energy)
 backward propagation
virtual void bbprop (fstate_idx< T > &in1, fstate_idx< T > &in2, fstate_idx< T > &energy)
 second-derivative backward propagation
virtual void forget (forget_param_linear &fp)
 forgetting weights by replacing with random values
virtual void normalize ()
 normalize

Public Attributes

module_1_1< T > & encoder
fstate_idx< T > enc_out
ebm_2< T > & enc_cost
double weight_energy_enc
fstate_idx< T > enc_energy
fstate_idx< T > z
ebm_1< T > & z_cost
double weight_energy_z
fstate_idx< T > z_energy
module_1_1< T > & decoder
fstate_idx< T > dec_out
ebm_2< T > & dec_cost
double weight_energy_dec
fstate_idx< T > dec_energy
gd_paraminfp

Protected Member Functions

virtual void fprop_one_pass (fstate_idx< T > &in1, fstate_idx< T > &in2, fstate_idx< T > &energy)
 forward propagation of in1 and in2, a simple one pass propagation
virtual void bprop_one_pass (fstate_idx< T > &in1, fstate_idx< T > &in2, fstate_idx< T > &energy)
 simple one-pass backward propagation
virtual void bprop_optimal_code (fstate_idx< T > &in1, fstate_idx< T > &in2, fstate_idx< T > &energy, gd_param &infp)
 multiple-pass bprop on the decoder only to find the optimal code z
virtual bool check_code_threshold (fstate_idx< T > &z, gd_param &infp)

Detailed Description

template<class T>
class ebl::codec< T >

generic coder/decoder module.


Member Function Documentation

template<class T >
bool ebl::codec< T >::check_code_threshold ( fstate_idx< T > &  z,
gd_param infp 
) [protected, virtual]

returns true if the l2-norm of the gradient of z (z.dx) is above the infp.gradient_threshold


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