|
libeblearn
|
#include <ebl_basic.h>
Public Member Functions | |
| zpad_module (const char *name="zpad") | |
| zpad_module (int nrows, int ncolumns) | |
| zpad_module (int top, int left, int bottom, int right) | |
| zpad_module (idxdim &kernel_size, const char *name="zpad") | |
| zpad_module (midxdim &kernels, const char *name="zpad") | |
| virtual | ~zpad_module () |
| destructor | |
| virtual void | fprop (mstate< Tstate > &in, mstate< Tstate > &out) |
| virtual void | fprop (Tstate &in, Tstate &out) |
| forward propagation from in to out | |
| virtual void | fprop (Tstate &in, idx< T > &out) |
| forward propagation from in to out | |
| virtual void | fprop (idx< T > &in, idx< T > &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 idxdim | get_paddings () |
| Return all paddings in an idxdim: top,left,bottom,right. | |
| virtual idxdim | get_paddings (idxdim &kernel) |
| virtual midxdim | get_paddings (midxdim &kernels) |
| virtual void | set_paddings (int top, int left, int bottom, int right) |
| Set all paddings for top, left, bottom and right sides. | |
| virtual void | set_paddings (idxdim &pads) |
| Set all paddings from 'pads' in this order: top,left,bottom,right. | |
| virtual void | set_kernel (idxdim &kernel) |
| Set all paddings according to 'kernel'. | |
| virtual void | set_kernels (midxdim &kernels) |
| Set all paddings according to 'kernels' for multi-state inputs. | |
| virtual fidxdim | fprop_size (fidxdim &i_size) |
| virtual fidxdim | bprop_size (const fidxdim &o_size) |
| virtual mfidxdim | fprop_size (mfidxdim &isize) |
| Returns multiple input dimensions corresponding to output dims 'osize'. | |
| virtual mfidxdim | bprop_size (mfidxdim &osize) |
| Returns multiple input dimensions corresponding to output dims 'osize'. | |
| virtual std::string | describe () |
| Returns a string describing this module and its parameters. | |
| virtual zpad_module< T, Tstate > * | copy (parameter< T, Tstate > *p=NULL) |
Protected Attributes | |
| idxdim | pad |
| Current padding (top,left,bottom,right). | |
| midxdim | pads |
| Paddings (top,left,bottom,right) for all scales. | |
a simple zero padding module that is mostly usefull for doing same size output convolutions.
| ebl::zpad_module< T, Tstate >::zpad_module | ( | const char * | name = "zpad" | ) |
Empty constructor. User should set paddings via the set_paddings() method.
| ebl::zpad_module< T, Tstate >::zpad_module | ( | int | nrows, |
| int | ncolumns | ||
| ) |
Constructs a zpad that adds same size borders on each side.
| nrows | The number of rows added on each side. |
| ncolumns | The number of cols added on each side. the output size is enlarged by 2*nrow in rows and 2*ncols in cols for each feature map. |
| ebl::zpad_module< T, Tstate >::zpad_module | ( | int | top, |
| int | left, | ||
| int | bottom, | ||
| int | right | ||
| ) |
Constructs a zpad module that adds padding on each side of a 2D input. (the 1st (features) dimension is left unchanged).
| top | The number of rows added on to the top side. |
| left | The number of rows added on to the left side. |
| bottom | The number of rows added on to the bottom side. |
| right | The number of rows added on to the right side. |
| ebl::zpad_module< T, Tstate >::zpad_module | ( | idxdim & | kernel_size, |
| const char * | name = "zpad" |
||
| ) |
Constructor adding zero borders with same size on each size if the kernel had odd size, otherwise adding 1 pixel less on the right and bottom borders.
| kernel_size | The sizes of the kernel for which to pad. |
| ebl::zpad_module< T, Tstate >::zpad_module | ( | midxdim & | kernels, |
| const char * | name = "zpad" |
||
| ) |
Constructor adding zero borders with same size on each size if the kernel had odd size, otherwise adding 1 pixel less on the right and bottom borders.
| kernels | A kernel for each input in case of multi-state input. |
| fidxdim ebl::zpad_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 >.
| zpad_module< T, Tstate > * ebl::zpad_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 >.
Reimplemented in ebl::mirrorpad_module< T, Tstate >.
| fidxdim ebl::zpad_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.
Recompute the input size to be compliant with the output
Reimplemented from ebl::module_1_1< T, Tstate >.
| idxdim ebl::zpad_module< T, Tstate >::get_paddings | ( | idxdim & | kernel | ) | [virtual] |
Returns all paddings associated with a 'kernel': top,left,bottom,right. This does not set any internal parameters of this module.
| midxdim ebl::zpad_module< T, Tstate >::get_paddings | ( | midxdim & | kernels | ) | [virtual] |
Returns all paddings associated with a 'kernel': top,left,bottom,right. This does not set any internal parameters of this module.