# itk:GradientDescentOptimizer seems not to return deterministic results with identical start conditions

**URL:** <https://discourse.itk.org/t/itk-gradientdescentoptimizer-seems-not-to-return-deterministic-results-with-identical-start-conditions/1684>\
**Category:** Algorithms\
**Created:** [March 19, 2019, 8:51am UTC](https://discourse.itk.org/t/itk-gradientdescentoptimizer-seems-not-to-return-deterministic-results-with-identical-start-conditions/1684 "2019-03-19T08:51:54Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![blowekamp](https://discourse.itk.org/user_avatar/discourse.itk.org/blowekamp/32/79_2.png) [@blowekamp](https://discourse.itk.org/u/blowekamp)\
**Post date:** [March 19, 2019, 12:57pm UTC](https://discourse.itk.org/t/itk-gradientdescentoptimizer-seems-not-to-return-deterministic-results-with-identical-start-conditions/1684/2 "2019-03-19T12:57:02Z")

</div>

You results are very close. To put that magnitude in perspective consider the estimated size of a sub atomic quark is 1e-15 meters. For any practically driven application, this would be defined well with in acceptable tolerances to say the least.

Two things to be aware of with reproducibility of the registration:

- Look for randomness in the components of the registration such as ImageRegistrationMethodv4:: [MetricSamplingReinitializeSeed](https://itk.org/Doxygen/html/classitk_1_1ImageRegistrationMethodv4.html#aecfd9f781b4d0d6d4198df96f0e787f9)
- Consider only using one thread to maximize reproducibility, because only within the limits floating point resolution operations are commutative.

There was also a similar recent post here: [Reproducibility of image registration](https://discourse.itk.org/t/reproducibility-of-image-registration/1591)

---

_[View the full topic](https://discourse.itk.org/t/itk-gradientdescentoptimizer-seems-not-to-return-deterministic-results-with-identical-start-conditions/1684)._
