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