# Gradient Descent Optimizer in Flux.jl

**URL:** <https://discourse.julialang.org/t/gradient-descent-optimizer-in-flux-jl/24169>\
**Category:** Machine Learning\
**Created:** [May 13, 2019, 11:32am UTC](https://discourse.julialang.org/t/gradient-descent-optimizer-in-flux-jl/24169 "2019-05-13T11:32:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![FGerace](https://avatars.discourse-cdn.com/v4/letter/f/90ced4/32.png) [@FGerace](https://discourse.julialang.org/u/FGerace)\
**Post date:** [May 13, 2019, 11:32am UTC](https://discourse.julialang.org/t/gradient-descent-optimizer-in-flux-jl/24169/1 "2019-05-13T11:32:33Z")

</div>

Hello,

I’ve recently started using Flux.jl. I’ve seen that Flux provides different kinds of optimizers, such as Descent, ADAM, etc etc…

I was just wondering: does the Descent optimizer perform full batch gradient descent, i.e. it sums up the gradient over all examples, or does it perform mini-batch/stochastic gradient descent, i.e. it sums up the gradient over a lower number of examples based on the batch size? If this is the case, how can I select the batch size?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![braamvandyk](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/braamvandyk/32/5086_2.png) [@braamvandyk](https://discourse.julialang.org/u/braamvandyk)\
**Post date:** [May 13, 2019, 5:12pm UTC](https://discourse.julialang.org/t/gradient-descent-optimizer-in-flux-jl/24169/2 "2019-05-13T17:12:11Z")

</div>

I believe it is stochastic gradient descent, but for ultimate verification, you can look at the source code.
