| Home | Trees | Indices | Help |
|
|---|
|
|
object --+
|
param.parameterized.Parameterized --+
|
ConnectionField
A set of weights on one input Sheet.
Each ConnectionField contributes to the activity of one unit on the output sheet, and is normally used as part of a Projection including many other ConnectionFields.
|
|||
|
Inherited from |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
_has_norm_total = Falsebool(x) -> bool |
|||
min_matrix_radius = param.Integer(default= 1, bounds= (0, NoneEnforced minimum for radius of weights matrix. |
|||
x = param.Number(default= 0.0, softbounds= (-1.0, 1.0), constaThe x coordinate of the location of the center of this ConnectionField on the input Sheet, e.g. |
|||
y = param.Number(default= 0.0, softbounds= (-1.0, 1.0), constaThe y coordinate of the location of the center of this ConnectionField on the input Sheet, e.g. |
|||
|
Inherited from |
|||
|
|||
| bounds | |||
| input_sheet_slice | |||
| mask | |||
|
norm_total The norm_total property returns a value useful in computing a sum-based weight normalization. |
|||
| weights | |||
|
Inherited from |
|||
|
|||
|
|
Create weights at the specified (x,y) location on the specified input_sheet. The supplied template (if a BoundingRegion) is converted to a Slice, moved to the specified (x,y) location, and then the weights pattern is drawn inside by the weights_generator. Note that if the appropriate template Slice is already known, then it can be passed in instead of a BoundingRegion template. This slice will then be used directly, instead of converting the template into a Slice. The supplied template object itself will not be modified (it is copied before use). The mask allows the weights to be limited to being non-zero in a subset of the rectangular weights area. The actual mask used is a view of the given mask created by cropping to the boundaries of the input_sheet, so that the weights all correspond to actual locations in the input sheet. For instance, if a circular pattern of weights is desired, the mask should have a disk-shaped pattern of elements with value 1, surrounded by elements with the value 0. If the CF extends over the edge of the input sheet then the weights will actually be half-moon (or similar) rather than circular.
|
|
Create the input_sheet_slice, which provides the appropriate Slice for this CF on the input_sheet (as well as providing this CF's exact bounds). Also creates the weights_slice, which provides the Slice for this weights matrix (in case it must be cropped at an edge). |
Change the bounding box for this ConnectionField. Discards weights or adds new (zero) weights as necessary, preserving existing values where possible. Currently only supports reducing the size, not increasing, but should be extended to support increasing as well. Note that the supplied template will be modified, so if you're also using them elsewhere you should pass copies. |
|
|||
_has_norm_totalbool(x) -> bool Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.
|
min_matrix_radiusEnforced minimum for radius of weights matrix. The default of 1 gives a minimum matrix of 3x3. 0 would allow a 1x1 matrix.
|
xThe x coordinate of the location of the center of this ConnectionField on the input Sheet, e.g. for use when determining where the weight matrix lines up with the input Sheet matrix.
|
yThe y coordinate of the location of the center of this ConnectionField on the input Sheet, e.g. for use when determining where the weight matrix lines up with the input Sheet matrix.
|
|
|||
bounds
|
norm_totalThe norm_total property returns a value useful in computing a sum-based weight normalization. By default, the value returned is simply the current sum of the connection weights. However, another value can be substituted by setting norm_total explicitly, and this cached value will then be returned instead. This mechanism has two main purposes. First, it allows a learning function to cache the sum value for an output function to use later without computation, which can result in significant time savings. Second, the extra level of indirection allows the sum value to be manipulated before it is used, to implement operations like joint normalization across corresponding CFs in multiple Projections. Apart from such cases, norm_total can be ignored. Note that every person who uses a class that sets or gets norm_total must be very careful to ensure that stale values will never be accessed. A good way to do this is to make sure that the value is only set just before it will be used, and deleted as soon as it has been accessed. WARNING: Any c-optimized code can bypass this property and access directly _has_norm_total, _norm_total
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Sun Oct 12 22:26:30 2008 | http://epydoc.sourceforge.net |