How to find gradients of weights and bias of multilayer neural network?

You can index the gradients using the parameters. If you have a layer, Flux.params should give you all parameters of that layer.

1 Like