# Gradients for recurrent models in Flux.jl

**URL:** https://discourse.julialang.org/t/gradients-for-recurrent-models-in-flux-jl/10787
**Category:** General Usage
**Tags:** question
**Created:** [May 8, 2018, 7:40pm UTC](https://discourse.julialang.org/t/gradients-for-recurrent-models-in-flux-jl/10787 "2018-05-08T19:40:42Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![rcnlee](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rcnlee/32/4107_2.png) [@rcnlee](https://discourse.julialang.org/u/rcnlee)
#### Post date: [May 8, 2018, 7:40pm UTC](https://discourse.julialang.org/t/gradients-for-recurrent-models-in-flux-jl/10787/1 "2018-05-08T19:40:42Z")

</div>

In the flux.jl [documentation](http://fluxml.ai/Flux.jl/stable/models/basics.html), it says that I can get the gradients by declaring weights W as a `param`, calling `back!(l)`, and then inspecting the `grad` field. How do I do this for a recurrent system? I want to get the sequence of gradients for a sequence of inputs.

Thanks!
