Spaces:
Sleeping
Sleeping
File size: 3,014 Bytes
31226fd | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | """MHRN core neural network components.
This package provides the fundamental building blocks of the MHRN
spiking neural network, including:
- 5D spatial indexing and coordinate transformations
- Izhikevich neuron model with multiple types, homeostasis, and energy
- Synaptic connections with STDP, reward-modulated plasticity, and metaplasticity
- Sparse spiking neural network with event-driven spike propagation
All components are fully typed and support serialization.
"""
from __future__ import annotations
from .network import (
Brain5DConfig,
NetworkConfig,
NeuralNetwork,
PostStepHook,
SimulationConfig,
SpikeEvent,
StepResult,
TopologyConfig,
create_network,
)
from .neuron import (
Neuron,
NeuronConfig,
NeuronType,
create_neuron,
create_random_neuron,
)
from .spatial_index import (
BITS_PER_DIM,
DIM_INDICES,
DIM_NAMES,
MASK,
MAX_COORD,
SHIFTS,
Coord5D,
Dim5D,
chebyshev_distance_5d,
coords_to_linear,
coords_to_linear_batch,
distance_5d,
euclidean_distance_5d,
get_dimension_index,
get_dimension_name,
is_valid_coord,
is_valid_coord_in_dims,
iter_linear_neighbours,
iter_neighbour_coords,
linear_to_5d,
linear_to_coord,
linear_to_coords_batch,
make_boundary_coord,
manhattan_distance_5d,
neighbour_count,
neighbour_offsets,
pack_coords,
total_cells,
unpack_coords,
validate_coord,
validate_coord_in_dims,
validate_dims,
weighted_distance_5d,
)
from .synapse import (
A_MINUS,
A_PLUS,
ELIGIBILITY_DECAY,
TAU_MINUS,
TAU_PLUS,
W_MAX,
W_MIN,
Synapse,
SynapseConfig,
create_random_synapse,
create_synapse,
)
__all__ = [
"BITS_PER_DIM",
"Coord5D",
"DIM_INDICES",
"DIM_NAMES",
"Dim5D",
"MASK",
"MAX_COORD",
"SHIFTS",
"chebyshev_distance_5d",
"coords_to_linear",
"coords_to_linear_batch",
"distance_5d",
"euclidean_distance_5d",
"get_dimension_index",
"get_dimension_name",
"is_valid_coord",
"is_valid_coord_in_dims",
"iter_linear_neighbours",
"iter_neighbour_coords",
"linear_to_5d",
"linear_to_coord",
"linear_to_coords_batch",
"make_boundary_coord",
"manhattan_distance_5d",
"neighbour_count",
"neighbour_offsets",
"pack_coords",
"total_cells",
"unpack_coords",
"validate_coord",
"validate_coord_in_dims",
"validate_dims",
"weighted_distance_5d",
"Neuron",
"NeuronConfig",
"NeuronType",
"create_neuron",
"create_random_neuron",
"A_MINUS",
"A_PLUS",
"ELIGIBILITY_DECAY",
"TAU_MINUS",
"TAU_PLUS",
"W_MAX",
"W_MIN",
"Synapse",
"SynapseConfig",
"create_random_synapse",
"create_synapse",
"Brain5DConfig",
"NetworkConfig",
"NeuralNetwork",
"PostStepHook",
"SimulationConfig",
"SpikeEvent",
"StepResult",
"TopologyConfig",
"create_network",
]
|