# \#fluxtraining

**URL:** https://discourse.julialang.org/tag/fluxtraining/1491.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [AD Troubles in Flux and Unusual Loss](https://discourse.julialang.org/t/ad-troubles-in-flux-and-unusual-loss/122995)

<div class="topic-metadata">

**Author:** [@gideonsimpson](https://discourse.julialang.org/u/gideonsimpson)\
**Replies:** 1\
**Last updated:** [November 24, 2024, 12:09am UTC](https://discourse.julialang.org/t/ad-troubles-in-flux-and-unusual-loss/122995 "2024-11-24T00:09:08Z")

</div>

I’m struggling with the following issue. I want to train on a somewhat nonstandard loss function involving the gradient of the target. If everything worked, I would. use the following code: using Flux using Random usi…

---

## [Freeze model parameters with FluxTraining.jl](https://discourse.julialang.org/t/freeze-model-parameters-with-fluxtraining-jl/115119)

<div class="topic-metadata">

**Author:** [@cirobr](https://discourse.julialang.org/u/cirobr)\
**Replies:** 0\
**Last updated:** [June 3, 2024, 1:18pm UTC](https://discourse.julialang.org/t/freeze-model-parameters-with-fluxtraining-jl/115119 "2024-06-03T13:18:00Z")

</div>

Cheers, Training a model with FluxTraining.jl requires building up a learner where the optimizer is declared. For instance: opt = Flux.Adam(eta) learner = Learner(model, lossfn, optimizer=opt) epoch!(learner, TrainingP…

---

## [Save best model in FluxTraining.jl](https://discourse.julialang.org/t/save-best-model-in-fluxtraining-jl/114591)

<div class="topic-metadata">

**Author:** [@cirobr](https://discourse.julialang.org/u/cirobr)\
**Replies:** 4\
**Last updated:** [May 24, 2024, 8:54am UTC](https://discourse.julialang.org/t/save-best-model-in-fluxtraining-jl/114591 "2024-05-24T08:54:12Z")

</div>

Cheers, is there a built-in way with fit! to save the model parameters (or model state) after each epoch? What about saving the best model only? Thanks in advance.

---

## [How to get the loss value from FluxTraining](https://discourse.julialang.org/t/how-to-get-the-loss-value-from-fluxtraining/114118)

<div class="topic-metadata">

**Author:** [@cirobr](https://discourse.julialang.org/u/cirobr)\
**Replies:** 0\
**Last updated:** [May 10, 2024, 5:44pm UTC](https://discourse.julialang.org/t/how-to-get-the-loss-value-from-fluxtraining/114118 "2024-05-10T17:44:36Z")

</div>

Cheers, In FluxTraining.jl, may I please ask how do we get the calculated loss value after executing one epoch with the below instruction? epoch!(learner, ValidationPhase(), validset) Thanks!

---

## [Does Lux work with FluxTraining?](https://discourse.julialang.org/t/does-lux-work-with-fluxtraining/108591)

<div class="topic-metadata">

**Author:** [@neuromancer](https://discourse.julialang.org/u/neuromancer)\
**Replies:** 0\
**Last updated:** [January 9, 2024, 9:33pm UTC](https://discourse.julialang.org/t/does-lux-work-with-fluxtraining/108591 "2024-01-09T21:33:38Z")

</div>

I’m thinking about switching from Flux to Lux, since I really need a WeightNorm layer and I am struggling to write one for myself. I am heavily entrenched into using FluxTraining. Does anyone know if Lux works with FluxT…

---

## [Warmup option in FluxTraining.jl](https://discourse.julialang.org/t/warmup-option-in-fluxtraining-jl/107773)

<div class="topic-metadata">

**Author:** [@cirobr](https://discourse.julialang.org/u/cirobr)\
**Replies:** 1\
**Last updated:** [December 23, 2023, 5:08am UTC](https://discourse.julialang.org/t/warmup-option-in-fluxtraining-jl/107773 "2023-12-23T05:08:49Z")

</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 …
