https://it.mathworks.com/help/deeplearning/ref/dlupdate.html
dlupdate - Update parameters using custom function - MATLAB
This MATLAB function updates the learnable parameters of the dlnetwork object net by evaluating the function fun with each learnable parameter as an input.
custom functionupdateparametersusingmatlab