Skip to content

Commit

Permalink
Simplify LIF E/I Network Proc Model
Browse files Browse the repository at this point in the history
  • Loading branch information
ackurth-nc committed Sep 22, 2022
1 parent e115ba0 commit 2eddfcd
Showing 1 changed file with 8 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@
{
"cell_type": "code",
"execution_count": 6,
"id": "474077c3",
"id": "fb2221aa",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -333,7 +333,7 @@
},
{
"cell_type": "markdown",
"id": "05712d4e",
"id": "34a1d495",
"metadata": {},
"source": [
"Finally, we have to set the weights given the above constraints. To this end, we sample the weights randomly from a Gaussian distribution with zero-mean and a standard deviation that scales with the ```q_factor```."
Expand Down Expand Up @@ -738,7 +738,10 @@
" \n",
" if convert:\n",
" proc_params = proc.proc_params._parameters\n",
" lif_params = SubEINetworkModel.convert_rate_to_lif_params(**proc_params)\n",
" # Convert rate parameters to LIF parameters.\n",
" # The mapping is based on:\n",
" # A unified view on weakly correlated recurrent network, Grytskyy et al., 2013\n",
" lif_params = convert_rate_to_lif_params(**proc_params)\n",
" \n",
" for key, val in lif_params.items():\n",
" try:\n",
Expand Down Expand Up @@ -805,24 +808,7 @@
" \n",
" # Alias v with state and u with state_alt.\n",
" proc.vars.state.alias(self.lif.vars.v)\n",
" proc.vars.state_alt.alias(self.lif.vars.u)\n",
" \n",
" def convert_rate_to_lif_params(**kwargs):\n",
" '''Convert rate parameters to LIF parameters.\n",
" The mapping is based on A unified view on weakly correlated recurrent network, Grytskyy et al. 2013.\n",
" \n",
" Parameters\n",
" ----------\n",
" kwargs : dict\n",
" Parameter dictionary for rate network\n",
" \n",
" Returns\n",
" -------\n",
" lif_network_dict : dict\n",
" Parameter dictionary for LIF network\n",
" ''' \n",
" \n",
" return convert_rate_to_lif_params(**kwargs)"
" proc.vars.state_alt.alias(self.lif.vars.u)"
]
},
{
Expand Down Expand Up @@ -1001,7 +987,7 @@
{
"data": {
"text/plain": [
"[<matplotlib.lines.Line2D at 0x7fdc18a427f0>]"
"[<matplotlib.lines.Line2D at 0x7ff5b4fc81f0>]"
]
},
"execution_count": 20,
Expand Down

0 comments on commit 2eddfcd

Please sign in to comment.