jaxsnn.event.modules.synapse
Functions
-
jaxsnn.event.modules.synapse.Synapse(mean: float = 0.5, std: float = 2.0, min_delay: float = 0.0, weight_scale: float = 1.0, transform: Callable = <function linear_saturating>) → Tuple[Callable, Dict] Creates a synapse initialization function and associated parameters.
- Parameters
mean – Mean value for initializing synaptic weights.
std – Standard deviation for initializing synaptic weights.
min_delay – Minimum allowable synaptic delay.
weight_scale – Scaling factor for synaptic weights.
transform – Transformation function applied to synaptic weights.
- Returns
A tuple containing: - gen: A generator function that provides an init function and a module
generator.
parameters: A dictionary containing the synapse configuration.
-
jaxsnn.event.modules.synapse.linear_saturating(weight: jax.Array, scale: float, min_weight: float = - 63.0, max_weight: float = 63.0, as_int: bool = True) → jax.Array Scale all weights according to:
w <- clip(scale * w, min_weight, max_weight)
- Parameters
weight – The weight array to be transformed.
scale – A constant the weight array is scaled with.
min_weight – The minimum value, smaller values are clipped to after scaling.
max_weight – The maximum value, bigger values are clipped to after scaling.
as_int – Round to nearest int and return as int type.
- Returns
The transformed weight tensor.