# \#simplechains

**URL:** https://discourse.julialang.org/tag/simplechains/1192.md

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

---

## [Custom train function in SimpleChains.jl](https://discourse.julialang.org/t/custom-train-function-in-simplechains-jl/103663)

<div class="topic-metadata">

**Author:** [@Luca\_Pepe\_Sciarria](https://discourse.julialang.org/u/Luca_Pepe_Sciarria)\
**Replies:** 0\
**Last updated:** [September 8, 2023, 12:30pm UTC](https://discourse.julialang.org/t/custom-train-function-in-simplechains-jl/103663 "2023-09-08T12:30:31Z")

</div>

Hi SimpleChains team! I’m currently using SimpleChains and I want to implement my own train function based on the available template in Flux: for d in training\_set # Our super logic gs = gradient(params(m)) do …

---

## [How to build custom loss function including restrictions about the derivatives of a model with respect to input features](https://discourse.julialang.org/t/how-to-build-custom-loss-function-including-restrictions-about-the-derivatives-of-a-model-with-respect-to-input-features/100880)

<div class="topic-metadata">

**Author:** [@yourun1218](https://discourse.julialang.org/u/yourun1218)\
**Replies:** 0\
**Last updated:** [June 27, 2023, 8:12am UTC](https://discourse.julialang.org/t/how-to-build-custom-loss-function-including-restrictions-about-the-derivatives-of-a-model-with-respect-to-input-features/100880 "2023-06-27T08:12:28Z")

</div>

Hi SimpleChains.jl people! I am trying to build a custom loss function including restrictions about the derivatives of a model with respect to input features in addition to the values of the model. In other words, I wou…

---

## [SimpleChains method error with custom loss function and train\_unbatched](https://discourse.julialang.org/t/simplechains-method-error-with-custom-loss-function-and-train-unbatched/89828)

<div class="topic-metadata">

**Author:** [@cdawg](https://discourse.julialang.org/u/cdawg)\
**Replies:** 7\
**Last updated:** [June 23, 2023, 2:43pm UTC](https://discourse.julialang.org/t/simplechains-method-error-with-custom-loss-function-and-train-unbatched/89828 "2023-06-23T14:43:24Z")

</div>

Hi SimpleChains.jl people! I am trying to build a contrastive classifier on small dimensional data. I built the custom loss function, following the example in the SimpleChains docs. valgrad! doesn’t error EDIT: but does…

---

## [Translating tensorflow to Flux and SimpleChains and not getting the same results](https://discourse.julialang.org/t/translating-tensorflow-to-flux-and-simplechains-and-not-getting-the-same-results/96134)

<div class="topic-metadata">

**Author:** [@dmetivie](https://discourse.julialang.org/u/dmetivie)\
**Replies:** 6\
**Last updated:** [March 24, 2023, 3:08pm UTC](https://discourse.julialang.org/t/translating-tensorflow-to-flux-and-simplechains-and-not-getting-the-same-results/96134 "2023-03-24T15:08:56Z")

</div>

For the past few days, I started working on an ML project. I looked at Flux.jl and SimpleChains.jl for doing pure Julia Deep Learning and TensorFlow, but I could not make them agree! The data: let say the model tries t…
