# Problems relating to "gradient is nothing"

**URL:** <https://discourse.julialang.org/t/problems-relating-to-gradient-is-nothing/121879>\
**Category:** General Usage\
**Created:** [October 28, 2024, 3:06pm UTC](https://discourse.julialang.org/t/problems-relating-to-gradient-is-nothing/121879 "2024-10-28T15:06:44Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/224680_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Post date:** [October 29, 2024, 2:14pm UTC](https://discourse.julialang.org/t/problems-relating-to-gradient-is-nothing/121879/11 "2024-10-29T14:14:36Z")

</div>

See also

> [@Problem relating to use gradient descends two models using GPU](https://discourse.julialang.org/t/problem-relating-to-use-gradient-descends-two-models-using-gpu/121911/3):
>
> Sorry, My fault. I mistakenly used trianloader…though I still didn’t know how to use it now. Anyway, it will run smoothly without using trainloader: using CUDA using Flux using Random Random.seed!(333) model1 = Chain( Dense(3, 3) |\> gpu ) model2 = Chain( model1, Dense(ones(3,3),true,relu) |\> gpu ) model3 = Chain( model1, Dense(ones(3,3),true,relu) |\> gpu ) A = [1.0,2.0,3.0] |\> gpu B = [1.0,1.0,1.0] |\> gpu label = [10,10,10] |\> gpu opt = Adam(0.1) opt\_stats = Flux.setup(op…

Did this solve your issue?

---

_[View the full topic](https://discourse.julialang.org/t/problems-relating-to-gradient-is-nothing/121879)._
