NiloufarRazmi / RL_Olfaction

GNU General Public License v3.0
1 stars 0 forks source link

Improve Python/NumPy code #1

Open kir0ul opened 1 year ago

kir0ul commented 1 year ago

At the moment, to convert the Cell data structure from Matlab, standard Python lists are used. Could be worth using Awkward Array to make computations faster and allow some broadcasting, see:

kir0ul commented 1 year ago
kir0ul commented 1 year ago

The code could be abstracted a bit more to higher level concepts, e.g., it could make sense to call higher level functions like a forward_pass(), backward_pass(), activation() (instead of copy/pasting several times the full length sigmoid function).

Could borrow some ideas from this reference code: https://github.com/mnielsen/neural-networks-and-deep-learning/blob/master/src/network.py, taken from Neural Networks and Deep Learning by Michael Nielsen