# In Zygote, why (model)-\>... in gradient

**URL:** https://discourse.julialang.org/t/in-zygote-why-model-in-gradient/34367
**Category:** Machine Learning
**Created:** [February 9, 2020, 3:42am UTC](https://discourse.julialang.org/t/in-zygote-why-model-in-gradient/34367 "2020-02-09T03:42:59Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)
#### Post date: [February 10, 2020, 6:15am UTC](https://discourse.julialang.org/t/in-zygote-why-model-in-gradient/34367/4 "2020-02-10T06:15:04Z")

</div>

What you write means the following  
`g = gradient(z-> mse(z.(x),y), model)`  
You take the gradient of the anonymous function with respect to its input in the point `model`

---

_[View the full topic](https://discourse.julialang.org/t/in-zygote-why-model-in-gradient/34367)._
