# Zygote: treating a model output as a constant

**URL:** <https://discourse.julialang.org/t/zygote-treating-a-model-output-as-a-constant/34172>\
**Category:** Machine Learning\
**Tags:** zygote\
**Created:** [February 4, 2020, 4:12pm UTC](https://discourse.julialang.org/t/zygote-treating-a-model-output-as-a-constant/34172 "2020-02-04T16:12:50Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![simeonschaub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simeonschaub/32/216566_2.png) [@simeonschaub](https://discourse.julialang.org/u/simeonschaub)\
**Post date:** [February 4, 2020, 5:18pm UTC](https://discourse.julialang.org/t/zygote-treating-a-model-output-as-a-constant/34172/3 "2020-02-04T17:18:46Z")

</div>

Are you looking for `Zygote.dropgrad`? There was some discussion about a similar problem in [this thread](https://discourse.julialang.org/t/stop-gradients-from-propagating-through-some-branches-of-computation-tree-in-flux/33392).

---

_[View the full topic](https://discourse.julialang.org/t/zygote-treating-a-model-output-as-a-constant/34172)._
