libeblearn
|
#include <ebl_codec.h>
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_param & | infp |
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) |
generic coder/decoder module.
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