genn-team / ml_genn

A library for deep learning with Spiking Neural Networks (SNN).
https://ml-genn.readthedocs.io
GNU Lesser General Public License v2.1
24 stars 7 forks source link

Add simple SGD optimiser #91

Open neworderofjamie opened 7 months ago

neworderofjamie commented 7 months ago

Custom update model would look something like this in standard PyGeNN (5.0.0) syntax:

gradient_descent_zero_gradient_model = create_custom_update_model(
    "gradient_descent_zero_gradient",
    params=["eta"],
    var_refs=[("gradient", "scalar"), ("variable", "scalar")],
    update_code="""
    // Descend!
    variable -= eta * gradient;
    """)

Will need to: