def __init__(self, id_, chip):
"""
cxt:
The CM1K offer 127 contexts in the range 1-127.
Context 0 is used during training to train all neurons against an input regardless of their contexts.
cat:
The CM1K offers 32767 categories in the range 1-32767.
Category 0 is used during training to present counterexamples (to shrink the neurons' AIFs)
If the neuron degenerates, bit 15 of the category is set to 1
(i.e., 32768 will be added to the category).
aif:
This should be indicated in the same range as dist, below, as determined by norm.
dist:
If the norm is L1, then distances will be in the range 0-65280 (255 x 256).
If the norm is Lsup (i.e., max), then distances will be in the range 0-255.
pattern:
A byte array which will be compared on a byte-by-byte basis (not bit-by-bit, so not hamming distance).
"""
log.trace("Neuron.init()")
self.id_ = id_
self.chip = chip
self.state = NeuronState.idle
self.cxt = 0 # Context
self.cat = 0 # Category
self.aif = 0 # Active influence field
self.degenerate = False # True when aif shrinks to minif
self.dist = 0
self.pattern = [] # Components (the pattern or rbf "center" stored in this neuron)
评论列表
文章目录