#include <fixedwtregion.h>
Inheritance diagram for FixedWtRegion:
It effectively computes the convolution of the weights with the input region. Accepts an empty kernel, in which case no convolution is done.
Convolution can optionally use a larger source image than destination to avoid aliasing. If so, the supplied kernel should be scaled to match.
Definition at line 118 of file fixedwtregion.h.
Public Methods | |
FixedWtRegion (string name_i, Dimensions dims, ActivationFunction *actfn_=0) | |
virtual void | add_input (const string &name, NeuralRegion &upstream_region, WeightFunction &fn, Length size_scale=1.0) |
Declare that the given region gives input to this region, and define any connections needed. | |
virtual Dimensions | input_dimensions (WeightFunction &fn, Length size_scale=1.0) |
Computes input dimensions that would be required to avoid border effects. | |
virtual void | activate (bool=false, bool=false, bool activate=false) |
Activate the map given the current inputs. | |
virtual void | backproject () |
Backproject current activity. | |
virtual NeuralRegion * | get_input (const string &name) |
Returns the specified input region for a unit. | |
virtual const WeightMatrix | get_weights (const string &name, int=0, int=0) const |
Returns weights from the given unit from the group of weights with the given name. | |
WeightBounds * | get_weights_bounds (const string &name, int ui=0, int uj=0) const |
Allocates and returns a BoundingBox on the map for the weights of the given unit; all active weights must lie within. | |
virtual bool | is_plastic () const |
Returns true if this region might contain modifiable weights. | |
double | size_connection_bytes () const |
Returns the size of this region, in terms of the number of bytes taken to store its connections. | |
double | size_unique_connections () const |
Returns the size of this region, in terms of the number of connections which might hold unique values. | |
Protected Types | |
typedef std::vector< Input * > | inputs_type |
Type to use for storing inputs. | |
Protected Methods | |
Subscript | input_row (const Input &input, Subscript row) const |
Subscript | input_col (const Input &input, Subscript col) const |
Protected Attributes | |
const OwningPointer< ActivationFunction > | actfn |
Activation function, often at most thresholding. | |
const Activity | xo |
Nominal offset relative to the origin. | |
const Activity | yo |
See xo. | |
inputs_type | inputs |
Set of inputs to this region. |
|
Activate the map given the current inputs. Must be implemented by derived classes. Implements NeuralRegion. Definition at line 144 of file fixedwtregion.h. References actfn, convolve(), dense_convolve(), inputs, and NeuralRegion::output. |
|
Declare that the given region gives input to this region, and define any connections needed. The connections will have the given name. Accepts fn (a unary function of size_scale) to initialize the weights. Implements InternalNeuralRegion. Definition at line 126 of file fixedwtregion.h. References Generic::insert_named(), and InternalNeuralRegion::WeightMatrix. |
|
Backproject current activity. Must be implemented by derived classes. yschoe Implements InternalNeuralRegion. Definition at line 169 of file fixedwtregion.h. References InternalNeuralRegion::backproject(), NeuralRegion::bp, get_input(), inputs, ipc_log(), NeuralRegion::output, and NeuralRegion::residual. |
|
Returns weights from the given unit from the group of weights with the given name. The weights returned may e.g. be a constant set of weights for all units regardless, or they may be generated on the fly, so bear that in mind. If a region does not have any weights with the specified name, it should return an empty (0x0) matrix. Implements InternalNeuralRegion. Definition at line 226 of file fixedwtregion.h. References inputs, FixedWtRegion::Input::kernel, and InternalNeuralRegion::WeightMatrix. |
|
Allocates and returns a BoundingBox on the map for the weights of the given unit; all active weights must lie within. This box is not guaranteed to be the minimum such box; it generally stays the same even if units are pruned, and some types may only implement a rectangular box even if weights are internally constrained to e.g. a circular region. Implements InternalNeuralRegion. Definition at line 232 of file fixedwtregion.h. References NeuralRegion::bounds(), NeuralRegion::Bounds, FixedWtRegion::Input::input, inputs, FixedWtRegion::Input::kernel, InternalNeuralRegion::WeightBounds, and InternalNeuralRegion::WeightMatrix. |
|
Returns true if this region might contain modifiable weights. Regions are assumed to be modifiable unless they declare otherwise. Reimplemented from NeuralRegion. Definition at line 249 of file fixedwtregion.h. |
|
Returns the size of this region, in terms of the number of bytes taken to store its connections. Required to be implemented by each type of region. Implements NeuralRegion. Definition at line 251 of file fixedwtregion.h. References Generic::accumulate(), and ISEQ. |
|
Returns the size of this region, in terms of the number of connections which might hold unique values. (This might be different from the total number of connections if e.g. some connections are shared between different units.) Implements NeuralRegion. Definition at line 254 of file fixedwtregion.h. References Generic::accumulate(), and ISEQ. |
|
Nominal offset relative to the origin. Only used by input_dimensions. Definition at line 288 of file fixedwtregion.h. |
|
See xo. Only used by input_dimensions. Definition at line 288 of file fixedwtregion.h. |