bmtk icon indicating copy to clipboard operation
bmtk copied to clipboard

Optimize fitfuns.py

Open CloudyDory opened this issue 2 years ago • 0 comments

The following changes are made in bmtk/simulator/filternet/lgnmodel/fitfuns.py to significantly speed up network preparation:

  • Optimize function ff() to use vectorized computation instead of looping over an NumPy array.
  • Replace the use of np.tile in function normalizecols() and makeBasis_StimKernel() by automatic broadcasting in NumPy.
  • In function makeBasis_StimKernel(), compute variable kbasis0 in a single step instead of using a for-loop in original code.

CloudyDory avatar Nov 02 '23 08:11 CloudyDory