# Warmup option in FluxTraining.jl

**URL:** <https://discourse.julialang.org/t/warmup-option-in-fluxtraining-jl/107773>\
**Category:** General Usage\
**Tags:** flux, fluxtraining, early-stop\
**Created:** [December 18, 2023, 2:30pm UTC](https://discourse.julialang.org/t/warmup-option-in-fluxtraining-jl/107773 "2023-12-18T14:30:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cirobr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cirobr/32/219994_2.png) [@cirobr](https://discourse.julialang.org/u/cirobr)\
**Post date:** [December 18, 2023, 2:30pm UTC](https://discourse.julialang.org/t/warmup-option-in-fluxtraining-jl/107773/1 "2023-12-18T14:30:59Z")

</div>

Cheers. I’m using FluxTraining.jl. I wonder if there is a kind of warmup option, which would allow training of n epochs without early stopping. If such an option is not implemented, any hint on how to do it at user code level? Thanks in advance.

---

<div class="post-metadata">

**Author:** ![ToucheSir](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/touchesir/32/14411_2.png) [@ToucheSir](https://discourse.julialang.org/u/ToucheSir)\
**Post date:** [December 23, 2023, 5:08am UTC](https://discourse.julialang.org/t/warmup-option-in-fluxtraining-jl/107773/2 "2023-12-23T05:08:49Z")

</div>

Yes. You should be able to use the `EarlyStopping(criteria...; kwargs...)` constructor (ref. [https://fluxml.ai/FluxTraining.jl/dev/references/FluxTraining.EarlyStopping?id=sourcefiles/FluxTraining/src/callbacks/earlystopping.jl&focus=1](https://fluxml.ai/FluxTraining.jl/dev/references/FluxTraining.EarlyStopping?id=sourcefiles/FluxTraining/src/callbacks/earlystopping.jl&focus=1)) with the `Warmup` criterion from [GitHub - JuliaAI/EarlyStopping.jl: Early stopping criteria for loss-generating iterative algorithms](https://github.com/JuliaAI/EarlyStopping.jl).
