# Flux training GPU vs CPU different results

**URL:** https://discourse.julialang.org/t/flux-training-gpu-vs-cpu-different-results/45165
**Category:** Machine Learning
**Tags:** gpu, flux
**Created:** [August 18, 2020, 3:40pm UTC](https://discourse.julialang.org/t/flux-training-gpu-vs-cpu-different-results/45165 "2020-08-18T15:40:40Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![german\_brunini](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/german_brunini/32/14484_2.png) [@german\_brunini](https://discourse.julialang.org/u/german_brunini)
#### Post date: [August 20, 2020, 8:19pm UTC](https://discourse.julialang.org/t/flux-training-gpu-vs-cpu-different-results/45165/8 "2020-08-20T20:19:02Z")

</div>

@darsnack I have a similar problem, but I believe is not related to GPU vs CPU. The problem appears when I wrap the training code inside a `function()` which acctually prevents me to upgrade the code to a more dynamic custom training loop. when I do the latter, it just gives me the same result allways, but when I run it from the REPL, it runs OK. I have made a different [post](https://discourse.julialang.org/t/training-gets-differents-results-when-using-flux-train-inside-function/45284) for this issue. I don’t know if it would be better to just continue this one… let me know @luboshanus if that’s Ok.

---

_[View the full topic](https://discourse.julialang.org/t/flux-training-gpu-vs-cpu-different-results/45165)._
