Skip to content

Commit

Permalink
Add patched synapse (#80)
Browse files Browse the repository at this point in the history
* Update __init__.py

Add point to patched components

* Add patched in __init__.py

Add patched synapses importing

* Add patched synaptic components

* Delete ngclearn/components/synapses/patched/__pycache__ directory

* Update __init__.py

new line characters added

* Update hebbianPatchedSynapse.py

* Update patchedSynapse.py

new line characters added

* Update staticPatchedSynapse.py

new line characters added

* Update staticPatchedSynapse.py

New line characters + comments for describing each input vars

* Update patchedSynapse.py

Removed a comment line

* Update hebbianPatchedSynapse.py

remove unused arguments

* Update hebbianPatchedSynapse.py

* Update hebbianPatchedSynapse.py

add description for w_mask

* Update hebbianPatchedSynapse.py

* Update hebbianPatchedSynapse.py

* Update patchedSynapse.py

* Update patchedSynapse.py

* Update hebbianPatchedSynapse.py
  • Loading branch information
Faezehabibi authored Dec 2, 2024
1 parent de53d20 commit 23473ab
Show file tree
Hide file tree
Showing 6 changed files with 686 additions and 3 deletions.
20 changes: 20 additions & 0 deletions ngclearn/components/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
from .jaxComponent import JaxComponent


## point to rate-coded cell component types
from .neurons.graded.rateCell import RateCell
from .neurons.graded.gaussianErrorCell import GaussianErrorCell
from .neurons.graded.laplacianErrorCell import LaplacianErrorCell
from .neurons.graded.rewardErrorCell import RewardErrorCell


## point to standard spiking cell component types
from .neurons.spiking.sLIFCell import SLIFCell
from .neurons.spiking.LIFCell import LIFCell
Expand All @@ -12,14 +16,20 @@
from .neurons.spiking.adExCell import AdExCell
from .neurons.spiking.fitzhughNagumoCell import FitzhughNagumoCell
from .neurons.spiking.izhikevichCell import IzhikevichCell


## point to transformer/operater component types
from .other.varTrace import VarTrace
from .other.expKernel import ExpKernel
from ngclearn.components.synapses.modulated.eligibilityTrace import EligibilityTrace


## point to input encoder component types
from .input_encoders.bernoulliCell import BernoulliCell
from .input_encoders.poissonCell import PoissonCell
from .input_encoders.latencyCell import LatencyCell


## point to synapse component types
from .synapses.denseSynapse import DenseSynapse
from .synapses.staticSynapse import StaticSynapse
Expand All @@ -30,6 +40,8 @@
from .synapses.hebbian.eventSTDPSynapse import EventSTDPSynapse
from .synapses.hebbian.BCMSynapse import BCMSynapse
from .synapses.STPDenseSynapse import STPDenseSynapse


## point to convolutional component types
from .synapses.convolution.convSynapse import ConvSynapse
from .synapses.convolution.staticConvSynapse import StaticConvSynapse
Expand All @@ -41,5 +53,13 @@
from .synapses.convolution.traceSTDPDeconvSynapse import TraceSTDPDeconvSynapse
## point to modulated component types
from .synapses.modulated.MSTDPETSynapse import MSTDPETSynapse


## point to monitors
from .monitor import Monitor

## point to patched component types
from .synapses.patched.patchedSynapse import PatchedSynapse
from .synapses.patched.staticPatchedSynapse import StaticPatchedSynapse
from .synapses.patched.hebbianPatc

16 changes: 13 additions & 3 deletions ngclearn/components/synapses/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
from .denseSynapse import DenseSynapse
from .staticSynapse import StaticSynapse


## short-term plasticity components
from .STPDenseSynapse import STPDenseSynapse


## dense synaptic components
from .hebbian.hebbianSynapse import HebbianSynapse
from .hebbian.STDPSynapse import STDPSynapse
from .hebbian.traceSTDPSynapse import TraceSTDPSynapse
from .hebbian.expSTDPSynapse import ExpSTDPSynapse
from .hebbian.eventSTDPSynapse import EventSTDPSynapse
from .hebbian.BCMSynapse import BCMSynapse


## conv/deconv synaptic components
from .convolution.convSynapse import ConvSynapse
from .convolution.staticConvSynapse import StaticConvSynapse
Expand All @@ -18,9 +24,13 @@
from .convolution.staticDeconvSynapse import StaticDeconvSynapse
from .convolution.hebbianDeconvSynapse import HebbianDeconvSynapse
from .convolution.traceSTDPDeconvSynapse import TraceSTDPDeconvSynapse


## modulated synaptic components
from .modulated.MSTDPETSynapse import MSTDPETSynapse

## patched synaptic components
## from .patched.patchedSynapse import PatchedSynapse
## from .patched.staticPatchedSynapse import StaticPatchedSynapse
## from .patched.hebbianPatchedSynapse import HebbianPatchedSynapse
from .patched.patchedSynapse import PatchedSynapse
from .patched.staticPatchedSynapse import StaticPatchedSynapse
from .patched.hebbianPatchedSynapse import HebbianPatchedSynapse

7 changes: 7 additions & 0 deletions ngclearn/components/synapses/patched/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## patched synaptic components
from .patchedSynapse import PatchedSynapse
from .staticPatchedSynapse import StaticPatchedSynapse
from .hebbianPatchedSynapse import HebbianPatchedSynapse



Loading

0 comments on commit 23473ab

Please sign in to comment.