|
libeblearn
|
#include <ebl_basic.h>
Public Member Functions | |
| convolution_module (parameter< T, Tstate > *p, idxdim &ker, idxdim &stride, idx< intg > &table, const char *name="convolution", bool crop=true) | |
| virtual | ~convolution_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 | |
| virtual void | forget (forget_param_linear &fp) |
| forgetting weights by replacing with random values | |
| virtual int | replicable_order () |
| order of operation | |
| virtual bool | resize_output (Tstate &in, Tstate &out) |
| virtual fidxdim | fprop_size (fidxdim &i_size) |
| virtual fidxdim | bprop_size (const fidxdim &o_size) |
| virtual convolution_module< T, Tstate > * | copy (parameter< T, Tstate > *p=NULL) |
| virtual void | load_x (idx< T > &weights) |
| Copy passed weights into x component of internal weights. | |
| virtual std::string | describe () |
| Returns a string describing this module and its parameters. | |
| virtual void | dump_fprop (Tstate &in, Tstate &out) |
Public Attributes | |
| intg | tablemax |
| Tstate | kernel |
| intg | thickness |
| idxdim | ker |
| idxdim | stride |
| idx< intg > | table |
| table of connections btw input and output | |
Protected Attributes | |
| bool | warnings_shown |
| bool | fulltable |
| indicating whether it is a full-table or not | |
| bool | float_precision |
| used for IPP and TH | |
| bool | double_precision |
| used for TH | |
| bool | crop |
| idx< T > | revkernel |
| Crop input when size mismatch or not. | |
| idx< T > | outtmp |
| a tmp buffer for IPP conv output | |
| bool | ipp_err_printed |
| Print an error msg only once. | |
| bool | use_ipp |
| IPP is useable or not. | |
This module applies 2D convolutions on dimensions 1 and 2 (0 contains different layers of information). This module has a replicable order of 3, if the input has a bigger order, use the replicable version of this module: convolution_module_replicable.
| ebl::convolution_module< T, Tstate >::convolution_module | ( | parameter< T, Tstate > * | p, |
| idxdim & | ker, | ||
| idxdim & | stride, | ||
| idx< intg > & | table, | ||
| const char * | name = "convolution", |
||
| bool | crop = true |
||
| ) |
Constructor.
| p | is used to store all parametric variables in a single place. If p is null, a local buffer will be used. |
| ker | The convolution kernel sizes. |
| stride | The convolution strides. |
| table | is the convolution connection table. |
| crop | If true, crop input when it does not match with the kernel. This allows to feed any input size to this module. |
| fidxdim ebl::convolution_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 >.
| convolution_module< T, Tstate > * ebl::convolution_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 >.
| void ebl::convolution_module< T, Tstate >::dump_fprop | ( | Tstate & | in, |
| Tstate & | out | ||
| ) | [virtual] |
Calls fprop and then dumps internal buffers, inputs and outputs into files. This can be useful for debugging.
Reimplemented from ebl::module_1_1< T, Tstate >.
| fidxdim ebl::convolution_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 >.
| bool ebl::convolution_module< T, Tstate >::resize_output | ( | Tstate & | in, |
| Tstate & | out | ||
| ) | [virtual] |
resize the output based on input dimensions This returns true if output was resized/reallocated, false otherwise.
idx<T> ebl::convolution_module< T, Tstate >::revkernel [protected] |
Crop input when size mismatch or not.
a reversed kernel for IPP