I think your loop is called only once as iterating a generator would exhaust it and you would need to refresh it or are you re-creating net_params before each update?
Add a print statement to the custom update loop and make sure the parameters are indeed being updated.