Skip to content

Commit

Permalink
Fix typos, amend comments, add license
Browse files Browse the repository at this point in the history
  • Loading branch information
ackurth-nc committed Sep 21, 2022
1 parent 5ab2673 commit 979d63f
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 80 deletions.
8 changes: 5 additions & 3 deletions tutorials/end_to_end/convert_params.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Copyright (C) 2021-22 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause
# See: https://spdx.org/licenses/
import numpy as np
import warnings
from scipy.optimize import fsolve
from scipy.special import zetac
from scipy.special import erf


# Method to convert parameters from rate to LIF
def convert_rate_to_lif_params(**kwargs):
'''Convert rate parameters to LIF parameters.
The mapping is based on A unified view on weakly correlated recurrent
Expand Down Expand Up @@ -87,13 +89,13 @@ def convert_rate_to_lif_params(**kwargs):
# Define auxiliary functions for weight conversion
def _mean_input(weight):
'''
Calculate mean input to single neuron given mean exciatory weight
Calculate mean input to single neuron given mean excitatory weight
'''
return num_neurons_exc * (1 - gamma * g_factor) * weight * rate + bias

def _std_input(weight):
'''
Calculate mean input to single neuron given mean exciatory weight
Calculate mean input to single neuron given mean excitatory weight
'''
return num_neurons_exc * (1 + gamma * g_factor**2) * weight ** 2 * rate

Expand Down
Loading

0 comments on commit 979d63f

Please sign in to comment.