Spaces:
Runtime error
Runtime error
Download src/core/synaptic/__init__.py from lk080424/swarm-chat: direct link, hf CLI and curl.
- Browser
- Download file 925 Bytes
-
https://huggingface.co/spaces/lk080424/swarm-chat/resolve/main/src/core/synaptic/__init__.py
- Command line
-
hf download hf://spaces/lk080424/swarm-chat/src/core/synaptic/__init__.py
-
curl -L -o __init__.py https://huggingface.co/spaces/lk080424/swarm-chat/resolve/main/src/core/synaptic/__init__.py
925 Bytes
| """ | |
| 突触微柱包 - L1/L2/L3三档突触模式 | |
| """ | |
| from .l1_sparse import SparseSynapticMicroColumn | |
| from .l2_layered import LayeredSynapticMicroColumn | |
| from .l3_full import FullSynapticMicroColumn | |
| # 基类别名 | |
| SynapticMicroColumn = SparseSynapticMicroColumn | |
| SYNAPTIC_TIERS = { | |
| 'L1': SparseSynapticMicroColumn, | |
| 'L2': LayeredSynapticMicroColumn, | |
| 'L3': FullSynapticMicroColumn, | |
| } | |
| def get_synaptic_micro_column(tier: str, num_neurons: int = 100, | |
| column_type: str = 'sensory', **kwargs): | |
| """创建突触微柱 | |
| Args: | |
| tier: 档位(L1/L2/L3) | |
| num_neurons: 神经元数量 | |
| column_type: 功能类型(仅L1/L2/L3内部用到) | |
| """ | |
| if tier not in SYNAPTIC_TIERS: | |
| raise ValueError(f"未知突触档位: {tier}, 可选: {list(SYNAPTIC_TIERS.keys())}") | |
| cls = SYNAPTIC_TIERS[tier] | |
| return cls(num_neurons=num_neurons, **kwargs) | |