PLearn 0.1
|
Reduce the size of the 2D images by adding the values of nearby pixels. More...
#include <Subsampling2DModule.h>
Public Member Functions | |
Subsampling2DModule () | |
Default constructor. | |
virtual void | fprop (const Vec &input, Vec &output) const |
given the input, compute the output (possibly resize it appropriately) | |
virtual void | bpropUpdate (const Vec &input, const Vec &output, Vec &input_gradient, const Vec &output_gradient, bool accumulate=false) |
Adapt based on the output gradient: this method should only be called just after a corresponding fprop; it should be called with the same arguments as fprop for the first two arguments (and output should not have been modified since then). | |
virtual void | bbpropUpdate (const Vec &input, const Vec &output, Vec &input_gradient, const Vec &output_gradient, Vec &input_diag_hessian, const Vec &output_diag_hessian, bool accumulate=false) |
Similar to bpropUpdate, but adapt based also on the estimation of the diagonal of the Hessian matrix, and propagates this back. | |
virtual void | forget () |
reset the parameters to the state they would be BEFORE starting training. | |
virtual string | classname () const |
virtual OptionList & | getOptionList () const |
virtual OptionMap & | getOptionMap () const |
virtual RemoteMethodMap & | getRemoteMethodMap () const |
virtual Subsampling2DModule * | deepCopy (CopiesMap &copies) const |
virtual void | build () |
Post-constructor. | |
virtual void | makeDeepCopyFromShallowCopy (CopiesMap &copies) |
Transforms a shallow copy into a deep copy. | |
Static Public Member Functions | |
static string | _classname_ () |
optionally perform some processing after training, or after a series of fprop/bpropUpdate calls to prepare the model for truly out-of-sample operation. | |
static OptionList & | _getOptionList_ () |
static RemoteMethodMap & | _getRemoteMethodMap_ () |
static Object * | _new_instance_for_typemap_ () |
static bool | _isa_ (const Object *o) |
static void | _static_initialize_ () |
static const PPath & | declaringFile () |
Public Attributes | |
int | n_input_images |
### declare public option fields (such as build options) here Start your comments with Doxygen-compatible comments such as //! | |
int | input_images_length |
Length of each of the input images. | |
int | input_images_width |
Width of each of the input images. | |
int | kernel_length |
Length of the areas to sum. | |
int | kernel_width |
Width of the areas to sum. | |
real | start_learning_rate |
Starting learning-rate, by which we multiply the gradient step. | |
real | decrease_constant |
learning_rate = start_learning_rate / (1 + decrease_constant*t), where t is the number of updates since the beginning | |
Vec | scale |
Scale applied to the sum (for each image) | |
Vec | bias |
Bias added after the scaling. | |
int | output_images_length |
Length of the output images. | |
int | output_images_width |
Width of the output images. | |
int | input_images_size |
Size of the input images (length * width) | |
int | output_images_size |
Size of the input images (length * width) | |
int | kernel_size |
Size of the input images (length * width) | |
Static Public Attributes | |
static StaticInitializer | _static_initializer_ |
Static Protected Member Functions | |
static void | declareOptions (OptionList &ol) |
Declares the class options. | |
Private Types | |
typedef OnlineLearningModule | inherited |
Private Member Functions | |
void | build_ () |
This does the actual building. | |
Private Attributes | |
real | learning_rate |
int | step_number |
TVec< Mat > | input_images |
TVec< Mat > | output_images |
TVec< Mat > | input_gradients |
TVec< Mat > | output_gradients |
TVec< Mat > | input_diag_hessians |
TVec< Mat > | output_diag_hessians |
Mat | kernel |
Mat | squared_kernel |
Mat | kernel_gradient |
Reduce the size of the 2D images by adding the values of nearby pixels.
Definition at line 51 of file Subsampling2DModule.h.
typedef OnlineLearningModule PLearn::Subsampling2DModule::inherited [private] |
Reimplemented from PLearn::OnlineLearningModule.
Definition at line 53 of file Subsampling2DModule.h.
PLearn::Subsampling2DModule::Subsampling2DModule | ( | ) |
Default constructor.
Definition at line 55 of file Subsampling2DModule.cc.
: n_input_images(1), input_images_length(-1), input_images_width(-1), kernel_length(-1), kernel_width(-1), start_learning_rate(0.), decrease_constant(0.), output_images_length(-1), output_images_width(-1), input_images_size(-1), output_images_size(-1), kernel_size(-1), learning_rate(0.), step_number(0) { }
string PLearn::Subsampling2DModule::_classname_ | ( | ) | [static] |
optionally perform some processing after training, or after a series of fprop/bpropUpdate calls to prepare the model for truly out-of-sample operation.
THE DEFAULT IMPLEMENTATION PROVIDED IN THE SUPER-CLASS DOES NOT DO ANYTHING. in case bpropUpdate does not do anything, make it known THE DEFAULT IMPLEMENTATION PROVIDED IN THE SUPER-CLASS RETURNS false;
Reimplemented from PLearn::OnlineLearningModule.
Definition at line 53 of file Subsampling2DModule.cc.
OptionList & PLearn::Subsampling2DModule::_getOptionList_ | ( | ) | [static] |
Reimplemented from PLearn::OnlineLearningModule.
Definition at line 53 of file Subsampling2DModule.cc.
RemoteMethodMap & PLearn::Subsampling2DModule::_getRemoteMethodMap_ | ( | ) | [static] |
Reimplemented from PLearn::OnlineLearningModule.
Definition at line 53 of file Subsampling2DModule.cc.
Reimplemented from PLearn::OnlineLearningModule.
Definition at line 53 of file Subsampling2DModule.cc.
Object * PLearn::Subsampling2DModule::_new_instance_for_typemap_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Definition at line 53 of file Subsampling2DModule.cc.
StaticInitializer Subsampling2DModule::_static_initializer_ & PLearn::Subsampling2DModule::_static_initialize_ | ( | ) | [static] |
Reimplemented from PLearn::OnlineLearningModule.
Definition at line 53 of file Subsampling2DModule.cc.
void PLearn::Subsampling2DModule::bbpropUpdate | ( | const Vec & | input, |
const Vec & | output, | ||
Vec & | input_gradient, | ||
const Vec & | output_gradient, | ||
Vec & | input_diag_hessian, | ||
const Vec & | output_diag_hessian, | ||
bool | accumulate = false |
||
) | [virtual] |
Similar to bpropUpdate, but adapt based also on the estimation of the diagonal of the Hessian matrix, and propagates this back.
If these methods are defined, you can use them INSTEAD of bpropUpdate(...) N.B. A DEFAULT IMPLEMENTATION IS PROVIDED IN THE SUPER-CLASS, WHICH JUST CALLS bbpropUpdate(input, output, input_gradient, output_gradient, out_hess, in_hess) AND IGNORES INPUT HESSIAN AND INPUT GRADIENT. this version allows to obtain the input gradient and diag_hessian
If these methods are defined, you can use them INSTEAD of bpropUpdate(...)
Reimplemented from PLearn::OnlineLearningModule.
Definition at line 395 of file Subsampling2DModule.cc.
References PLearn::backConvolve2D(), bpropUpdate(), PLearn::TMat< T >::fill(), i, input_diag_hessians, input_images_length, input_images_size, input_images_width, PLearn::OnlineLearningModule::input_size, kernel, kernel_length, kernel_width, n_input_images, output_diag_hessians, output_images_length, output_images_size, output_images_width, PLearn::OnlineLearningModule::output_size, PLASSERT_MSG, PLERROR, PLearn::TVec< T >::resize(), scale, PLearn::TVec< T >::size(), squared_kernel, PLearn::TVec< T >::subVec(), and PLearn::TVec< T >::toMat().
{ // This version forwards the second order information, but does not // actually use it for the update. // Check size if( output_diag_hessian.size() != output_size ) PLERROR("Subsampling2DModule::bbpropUpdate: output_diag_hessian.size()" "\n" "should be equal to output_size (%i != %i).\n", output_diag_hessian.size(), output_size); if( accumulate ) { PLASSERT_MSG( input_diag_hessian.size() == input_size, "Cannot resize input_diag_hessian AND accumulate into it" ); } else input_diag_hessian.resize(input_size); // Make input_diag_hessians and output_diag_hessians point to the right // places for( int i=0 ; i<n_input_images ; i++ ) { input_diag_hessians[i] = input_diag_hessian.subVec(i*input_images_size, input_images_size) .toMat( input_images_length, input_images_width ); output_diag_hessians[i] = output_diag_hessian.subVec(i*output_images_size,output_images_size) .toMat( output_images_length, output_images_width ); } // Propagates to input_diag_hessian for( int i=0 ; i<n_input_images ; i++ ) { kernel.fill( scale[i] ); squared_kernel.fill( scale[i]*scale[i] ); backConvolve2D( input_diag_hessians[i], squared_kernel, output_diag_hessians[i], kernel_length, kernel_width, accumulate ); } // Call bpropUpdate() bpropUpdate( input, output, input_gradient, output_gradient ); }
void PLearn::Subsampling2DModule::bpropUpdate | ( | const Vec & | input, |
const Vec & | output, | ||
Vec & | input_gradient, | ||
const Vec & | output_gradient, | ||
bool | accumulate = false |
||
) | [virtual] |
Adapt based on the output gradient: this method should only be called just after a corresponding fprop; it should be called with the same arguments as fprop for the first two arguments (and output should not have been modified since then).
this version allows to obtain the input gradient as well
Since sub-classes are supposed to learn ONLINE, the object is 'ready-to-be-used' just after any bpropUpdate. N.B. A DEFAULT IMPLEMENTATION IS PROVIDED IN THE SUPER-CLASS, WHICH JUST CALLS bpropUpdate(input, output, input_gradient, output_gradient) AND IGNORES INPUT GRADIENT. this version allows to obtain the input gradient as well N.B. THE DEFAULT IMPLEMENTATION IN SUPER-CLASS JUST RAISES A PLERROR.
Reimplemented from PLearn::OnlineLearningModule.
Definition at line 282 of file Subsampling2DModule.cc.
References bias, PLearn::TMat< T >::clear(), PLearn::convolve2Dbackprop(), decrease_constant, PLearn::TMat< T >::fill(), i, input_gradients, input_images, input_images_length, input_images_size, input_images_width, PLearn::OnlineLearningModule::input_size, kernel, kernel_gradient, kernel_length, kernel_width, learning_rate, n_input_images, output_gradients, output_images_length, output_images_size, output_images_width, PLearn::OnlineLearningModule::output_size, PLASSERT_MSG, PLERROR, PLearn::TVec< T >::resize(), scale, PLearn::TVec< T >::size(), start_learning_rate, step_number, PLearn::TVec< T >::subVec(), PLearn::sum(), and PLearn::TVec< T >::toMat().
Referenced by bbpropUpdate().
{ // Check size if( input.size() != input_size ) PLERROR("Subsampling2DModule::bpropUpdate: input.size() should be\n" "equal to input_size (%i != %i).\n", input.size(), input_size); if( output.size() != output_size ) PLERROR("Subsampling2DModule::bpropUpdate: output.size() should be\n" "equal to output_size (%i != %i).\n", output.size(), output_size); if( output_gradient.size() != output_size ) PLERROR("Subsampling2DModule::bpropUpdate: output_gradient.size()" " should be\n" "equal to output_size (%i != %i).\n", output_gradient.size(), output_size); if( accumulate ) { PLASSERT_MSG( input_gradient.size() == input_size, "Cannot resize input_gradient AND accumulate into it" ); } else input_gradient.resize(input_size); // Since fprop() has just been called, we assume that input_images, // output_images and gradient are up-to-date // Make input_gradients and output_gradients point to the right places for( int i=0 ; i<n_input_images ; i++ ) { input_gradients[i] = input_gradient.subVec(i*input_images_size, input_images_size) .toMat( input_images_length, input_images_width ); output_gradients[i] = output_gradient.subVec(i*output_images_size, output_images_size) .toMat( output_images_length, output_images_width ); } // Do the actual bprop and update learning_rate = start_learning_rate / (1+decrease_constant*step_number); for( int i=0 ; i<n_input_images ; i++ ) { kernel.fill( scale[i] ); kernel_gradient.clear(); convolve2Dbackprop( input_images[i], kernel, output_gradients[i], input_gradients[i], kernel_gradient, kernel_length, kernel_width, accumulate ); // The scale's gradient is the sum of contributions to kernel_gradient scale[i] -= learning_rate * sum( kernel_gradient ); bias[i] -= learning_rate * sum( output_gradients[i] ); } step_number++; }
void PLearn::Subsampling2DModule::build | ( | ) | [virtual] |
Post-constructor.
The normal implementation should call simply inherited::build(), then this class's build_(). This method should be callable again at later times, after modifying some option fields to change the "architecture" of the object.
Reimplemented from PLearn::OnlineLearningModule.
Definition at line 210 of file Subsampling2DModule.cc.
References PLearn::OnlineLearningModule::build(), and build_().
{ inherited::build(); build_(); }
void PLearn::Subsampling2DModule::build_ | ( | ) | [private] |
This does the actual building.
Reimplemented from PLearn::OnlineLearningModule.
Definition at line 153 of file Subsampling2DModule.cc.
References bias, PLearn::endl(), input_gradients, input_images, input_images_length, input_images_size, input_images_width, PLearn::OnlineLearningModule::input_size, kernel, kernel_gradient, kernel_length, kernel_size, kernel_width, n_input_images, output_gradients, output_images, output_images_length, output_images_size, output_images_width, PLearn::OnlineLearningModule::output_size, PLERROR, PLearn::TMat< T >::resize(), PLearn::TVec< T >::resize(), and scale.
Referenced by build().
{ MODULE_LOG << "build_() called" << endl; // Verify the parameters if( n_input_images < 1 ) PLERROR("Subsampling2DModule::build_: 'n_input_images' < 1 (%i).\n", n_input_images); if( input_images_length < 0 ) PLERROR("Subsampling2DModule::build_: 'input_images_length'<0 (%i).\n", input_images_length); if( input_images_width < 0 ) PLERROR("Subsampling2DModule::build_: 'input_images_width'<0 (%i).\n", input_images_width); if( kernel_length < 0 ) PLERROR("Subsampling2DModule::build_: 'kernel_length'<0 (%i).\n", kernel_length); if( kernel_width < 0 ) PLERROR("Subsampling2DModule::build_: 'kernel_width'<0 (%i).\n", kernel_width); if( input_images_length % kernel_length != 0 ) PLERROR("Subsampling2DModule::build_: input_images_length (%i)\n" "should be a multiple of kernel_length (%i).\n", input_images_length, kernel_length); if( input_images_width % kernel_width != 0 ) PLERROR("Subsampling2DModule::build_: input_images_width (%i)\n" "should be a multiple of kernel_width (%i).\n", input_images_width, kernel_width); // Build the learntoptions from the buildoptions input_images_size = input_images_length * input_images_width; input_size = n_input_images * input_images_size; output_images_length = input_images_length / kernel_length; output_images_width = input_images_width / kernel_width; output_images_size = output_images_length * output_images_width; output_size = n_input_images * output_images_size; kernel_size = kernel_length * kernel_width; scale.resize(n_input_images); bias.resize(n_input_images); input_images.resize(n_input_images); output_images.resize(n_input_images); kernel.resize(kernel_length, kernel_width); input_gradients.resize(n_input_images); output_gradients.resize(n_input_images); kernel_gradient.resize(kernel_length, kernel_width); }
string PLearn::Subsampling2DModule::classname | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 53 of file Subsampling2DModule.cc.
void PLearn::Subsampling2DModule::declareOptions | ( | OptionList & | ol | ) | [static, protected] |
Declares the class options.
Reimplemented from PLearn::OnlineLearningModule.
Definition at line 73 of file Subsampling2DModule.cc.
References bias, PLearn::OptionBase::buildoption, PLearn::declareOption(), PLearn::OnlineLearningModule::declareOptions(), decrease_constant, input_images_length, input_images_width, PLearn::OnlineLearningModule::input_size, kernel_length, kernel_width, PLearn::OptionBase::learntoption, n_input_images, output_images_length, output_images_width, PLearn::OnlineLearningModule::output_size, PLearn::redeclareOption(), scale, and start_learning_rate.
{ // declareOption(ol, "myoption", &Subsampling2DModule::myoption, // OptionBase::buildoption, // "Help text describing this option"); declareOption(ol, "n_input_images", &Subsampling2DModule::n_input_images, OptionBase::buildoption, "Number of input images present at the same time in the" " input vector"); declareOption(ol, "input_images_length", &Subsampling2DModule::input_images_length, OptionBase::buildoption, "Length of each of the input images"); declareOption(ol, "input_images_width", &Subsampling2DModule::input_images_width, OptionBase::buildoption, "Width of each of the input images"); declareOption(ol, "kernel_length", &Subsampling2DModule::kernel_length, OptionBase::buildoption, "Length of the areas to sum" ); declareOption(ol, "kernel_width", &Subsampling2DModule::kernel_width, OptionBase::buildoption, "Width of the areas to sum" ); declareOption(ol, "start_learning_rate", &Subsampling2DModule::start_learning_rate, OptionBase::buildoption, "Starting learning-rate, by which we multiply the gradient" " step" ); declareOption(ol, "decrease_constant", &Subsampling2DModule::decrease_constant, OptionBase::buildoption, "learning_rate = start_learning_rate / (1 +" " decrease_constant*t),\n" "where t is the number of updates since the beginning\n" ); declareOption(ol, "output_images_length", &Subsampling2DModule::output_images_length, OptionBase::learntoption, "Length of the output images"); declareOption(ol, "output_images_width", &Subsampling2DModule::output_images_width, OptionBase::learntoption, "Width of the output images"); declareOption(ol, "scale", &Subsampling2DModule::scale, OptionBase::learntoption, "Contains the scale of the output images"); declareOption(ol, "bias", &Subsampling2DModule::bias, OptionBase::learntoption, "Contains the bias of the output images"); // Now call the parent class' declareOptions inherited::declareOptions(ol); // Redeclare some of the parent's options as learntoptions redeclareOption(ol, "input_size", &Subsampling2DModule::input_size, OptionBase::learntoption, "Size of the input, computed from n_input_images,\n" "input_images_length and input_images_width.\n"); redeclareOption(ol, "output_size", &Subsampling2DModule::output_size, OptionBase::learntoption, "Size of the output, computed from n_output_images,\n" "output_images_length and output_images_width.\n"); }
static const PPath& PLearn::Subsampling2DModule::declaringFile | ( | ) | [inline, static] |
Reimplemented from PLearn::OnlineLearningModule.
Definition at line 183 of file Subsampling2DModule.h.
:
//##### Protected Member Functions ######################################
Subsampling2DModule * PLearn::Subsampling2DModule::deepCopy | ( | CopiesMap & | copies | ) | const [virtual] |
Reimplemented from PLearn::OnlineLearningModule.
Definition at line 53 of file Subsampling2DModule.cc.
void PLearn::Subsampling2DModule::forget | ( | ) | [virtual] |
reset the parameters to the state they would be BEFORE starting training.
Note that this method is necessarily called from build().
Implements PLearn::OnlineLearningModule.
Definition at line 343 of file Subsampling2DModule.cc.
References bias, PLearn::TVec< T >::clear(), kernel_length, kernel_width, PLWARNING, PLearn::OnlineLearningModule::random_gen, and scale.
{ bias.clear(); if( !random_gen ) { PLWARNING( "Subsampling2DModule: cannot forget() without random_gen" ); return; } real scale_factor = 1./(kernel_length*kernel_width); random_gen->fill_random_uniform( scale, -scale_factor, scale_factor ); }
given the input, compute the output (possibly resize it appropriately)
Reimplemented from PLearn::OnlineLearningModule.
Definition at line 234 of file Subsampling2DModule.cc.
References bias, PLearn::convolve2D(), PLearn::TMat< T >::fill(), PLearn::TVec< T >::fill(), i, input_images, input_images_length, input_images_size, input_images_width, PLearn::OnlineLearningModule::input_size, kernel, kernel_length, kernel_width, n_input_images, output_images, output_images_length, output_images_size, output_images_width, PLearn::OnlineLearningModule::output_size, PLERROR, PLearn::TVec< T >::resize(), scale, PLearn::TVec< T >::size(), PLearn::TVec< T >::subVec(), and PLearn::TVec< T >::toMat().
{ // Check size if( input.size() != input_size ) PLERROR("Subsampling2DModule::fprop: input.size() should be equal to\n" "input_size (%i != %i).\n", input.size(), input_size); output.resize(output_size); // Make input_images and output_images point to the right places for( int i=0 ; i<n_input_images ; i++ ) { input_images[i] = input.subVec(i*input_images_size, input_images_size) .toMat( input_images_length, input_images_width ); output_images[i] = output.subVec(i*output_images_size, output_images_size) .toMat( output_images_length, output_images_width ); } // Compute the values of the output_images for( int i=0 ; i<n_input_images ; i++ ) { output_images[i].fill( bias[i] ); kernel.fill( scale[i] ); convolve2D( input_images[i], kernel, output_images[i], kernel_length, kernel_width, true ); } }
OptionList & PLearn::Subsampling2DModule::getOptionList | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 53 of file Subsampling2DModule.cc.
OptionMap & PLearn::Subsampling2DModule::getOptionMap | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 53 of file Subsampling2DModule.cc.
RemoteMethodMap & PLearn::Subsampling2DModule::getRemoteMethodMap | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 53 of file Subsampling2DModule.cc.
void PLearn::Subsampling2DModule::makeDeepCopyFromShallowCopy | ( | CopiesMap & | copies | ) | [virtual] |
Transforms a shallow copy into a deep copy.
Reimplemented from PLearn::OnlineLearningModule.
Definition at line 217 of file Subsampling2DModule.cc.
References bias, PLearn::deepCopyField(), input_gradients, input_images, kernel, kernel_gradient, PLearn::OnlineLearningModule::makeDeepCopyFromShallowCopy(), output_gradients, output_images, scale, and squared_kernel.
{ inherited::makeDeepCopyFromShallowCopy(copies); deepCopyField(scale, copies); deepCopyField(bias, copies); deepCopyField(input_images, copies); deepCopyField(output_images, copies); deepCopyField(input_gradients, copies); deepCopyField(output_gradients, copies); deepCopyField(kernel, copies); deepCopyField(squared_kernel, copies); deepCopyField(kernel_gradient, copies); }
Reimplemented from PLearn::OnlineLearningModule.
Definition at line 183 of file Subsampling2DModule.h.
Bias added after the scaling.
Definition at line 89 of file Subsampling2DModule.h.
Referenced by bpropUpdate(), build_(), declareOptions(), forget(), fprop(), and makeDeepCopyFromShallowCopy().
learning_rate = start_learning_rate / (1 + decrease_constant*t), where t is the number of updates since the beginning
Definition at line 81 of file Subsampling2DModule.h.
Referenced by bpropUpdate(), and declareOptions().
Definition at line 217 of file Subsampling2DModule.h.
Referenced by bbpropUpdate().
TVec<Mat> PLearn::Subsampling2DModule::input_gradients [private] |
Definition at line 215 of file Subsampling2DModule.h.
Referenced by bpropUpdate(), build_(), and makeDeepCopyFromShallowCopy().
TVec<Mat> PLearn::Subsampling2DModule::input_images [private] |
Definition at line 213 of file Subsampling2DModule.h.
Referenced by bpropUpdate(), build_(), fprop(), and makeDeepCopyFromShallowCopy().
Length of each of the input images.
Definition at line 65 of file Subsampling2DModule.h.
Referenced by bbpropUpdate(), bpropUpdate(), build_(), declareOptions(), and fprop().
Size of the input images (length * width)
Definition at line 99 of file Subsampling2DModule.h.
Referenced by bbpropUpdate(), bpropUpdate(), build_(), and fprop().
Width of each of the input images.
Definition at line 68 of file Subsampling2DModule.h.
Referenced by bbpropUpdate(), bpropUpdate(), build_(), declareOptions(), and fprop().
Mat PLearn::Subsampling2DModule::kernel [mutable, private] |
Definition at line 221 of file Subsampling2DModule.h.
Referenced by bbpropUpdate(), bpropUpdate(), build_(), fprop(), and makeDeepCopyFromShallowCopy().
Mat PLearn::Subsampling2DModule::kernel_gradient [mutable, private] |
Definition at line 225 of file Subsampling2DModule.h.
Referenced by bpropUpdate(), build_(), and makeDeepCopyFromShallowCopy().
Length of the areas to sum.
Definition at line 71 of file Subsampling2DModule.h.
Referenced by bbpropUpdate(), bpropUpdate(), build_(), declareOptions(), forget(), and fprop().
Size of the input images (length * width)
Definition at line 105 of file Subsampling2DModule.h.
Referenced by build_().
Width of the areas to sum.
Definition at line 74 of file Subsampling2DModule.h.
Referenced by bbpropUpdate(), bpropUpdate(), build_(), declareOptions(), forget(), and fprop().
Definition at line 208 of file Subsampling2DModule.h.
Referenced by bpropUpdate().
### declare public option fields (such as build options) here Start your comments with Doxygen-compatible comments such as //!
Number of input images present at the same time in the input vector
Definition at line 62 of file Subsampling2DModule.h.
Referenced by bbpropUpdate(), bpropUpdate(), build_(), declareOptions(), and fprop().
Definition at line 218 of file Subsampling2DModule.h.
Referenced by bbpropUpdate().
TVec<Mat> PLearn::Subsampling2DModule::output_gradients [private] |
Definition at line 216 of file Subsampling2DModule.h.
Referenced by bpropUpdate(), build_(), and makeDeepCopyFromShallowCopy().
TVec<Mat> PLearn::Subsampling2DModule::output_images [private] |
Definition at line 214 of file Subsampling2DModule.h.
Referenced by build_(), fprop(), and makeDeepCopyFromShallowCopy().
Length of the output images.
Definition at line 93 of file Subsampling2DModule.h.
Referenced by bbpropUpdate(), bpropUpdate(), build_(), declareOptions(), and fprop().
Size of the input images (length * width)
Definition at line 102 of file Subsampling2DModule.h.
Referenced by bbpropUpdate(), bpropUpdate(), build_(), and fprop().
Width of the output images.
Definition at line 96 of file Subsampling2DModule.h.
Referenced by bbpropUpdate(), bpropUpdate(), build_(), declareOptions(), and fprop().
Scale applied to the sum (for each image)
Definition at line 86 of file Subsampling2DModule.h.
Referenced by bbpropUpdate(), bpropUpdate(), build_(), declareOptions(), forget(), fprop(), and makeDeepCopyFromShallowCopy().
Mat PLearn::Subsampling2DModule::squared_kernel [mutable, private] |
Definition at line 223 of file Subsampling2DModule.h.
Referenced by bbpropUpdate(), and makeDeepCopyFromShallowCopy().
Starting learning-rate, by which we multiply the gradient step.
Definition at line 77 of file Subsampling2DModule.h.
Referenced by bpropUpdate(), and declareOptions().
int PLearn::Subsampling2DModule::step_number [private] |
Definition at line 209 of file Subsampling2DModule.h.
Referenced by bpropUpdate().