Pruning
self, equation, proba=1.0) Pruning(
Dataclass to represent a pruning condition for structural plasticity.
When the condition is true, a synapse is pruned with the specified probability.
= ann.Synapse(
PruningSynapse = dict(T = ann.Parameter(10000, 'global', int),
parameters = ann.Variable('''
equations age = if pre.r * post.r > 0.0 :
0
else :
age + 1 : init = 0, int
''', init=0, type=int)
= ann.Pruning("age > T", proba = 0.5),
pruning )
Parameters
Name | Type | Description | Default |
---|---|---|---|
equation | str | string representing the equation. | required |
proba | float | probability of pruning of the synapse. | 1.0 |