Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

FixedWtRegion Class Reference

#include <fixedwtregion.h>

Inheritance diagram for FixedWtRegion:

Inheritance graph
[legend]
Collaboration diagram for FixedWtRegion:

Collaboration graph
[legend]
List of all members.

Detailed Description

NeuralRegion with a fixed, shared set of weights for all neurons.

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 NeuralRegionget_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.

WeightBoundsget_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< ActivationFunctionactfn
 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.


Member Function Documentation

virtual void FixedWtRegion::activate bool    = false,
bool    = false,
bool    activate = false
[inline, virtual]
 

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.

virtual void FixedWtRegion::add_input const string &    name,
NeuralRegion   upstream_region,
WeightFunction   fn,
Length    size_scale = 1.0
[inline, virtual]
 

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.

virtual void FixedWtRegion::backproject   [inline, virtual]
 

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.

virtual const WeightMatrix FixedWtRegion::get_weights const string &    name,
int    = 0,
int    = 0
const [inline, virtual]
 

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.

WeightBounds* FixedWtRegion::get_weights_bounds const string &    name,
int    ui = 0,
int    uj = 0
const [inline, virtual]
 

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.

virtual bool FixedWtRegion::is_plastic   const [inline, virtual]
 

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.

double FixedWtRegion::size_connection_bytes   const [inline, virtual]
 

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.

double FixedWtRegion::size_unique_connections   const [inline, virtual]
 

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.


Member Data Documentation

const Activity FixedWtRegion::xo [protected]
 

Nominal offset relative to the origin.

Only used by input_dimensions.

Definition at line 288 of file fixedwtregion.h.

const Activity FixedWtRegion::yo [protected]
 

See xo.

Only used by input_dimensions.

Definition at line 288 of file fixedwtregion.h.


The documentation for this class was generated from the following file:
Generated on Mon Jan 20 02:37:00 2003 for RF-LISSOM by doxygen1.3-rc2