# I am building a simple to use autoencoder model.. anyone interested?

**URL:** https://discourse.julialang.org/t/i-am-building-a-simple-to-use-autoencoder-model-anyone-interested/108146
**Category:** Machine Learning
**Tags:** machine-learning, mlj, betaml
**Created:** [December 28, 2023, 11:34pm UTC](https://discourse.julialang.org/t/i-am-building-a-simple-to-use-autoencoder-model-anyone-interested/108146 "2023-12-28T23:34:41Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)
#### Post date: [December 28, 2023, 11:34pm UTC](https://discourse.julialang.org/t/i-am-building-a-simple-to-use-autoencoder-model-anyone-interested/108146/1 "2023-12-28T23:34:41Z")

</div>

Hello, I saw that all autoencoders presented in the various blogs require to actually implement the autoencoder from a DL framework.

I am implementing instead one where the user just creates the model `m =AutoEncoder(outdims=4)` (with optional definition of the encoding/decoding layers, specification of the epochs, batch size, etc…), fit it `fit!(m,x)` and predict the encoded values `predict(m,x)` or decode them with `inverse_predict(m,encoded_x)`.

I just wander if do you think this could be useful to someone and could be eventually land as a transformer model in MLJ… (I haven’t done the MLJ wrapper yet)

@ablaom

---

<div class="post-metadata">

### Author: ![gvdr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gvdr/32/6387_2.png) [@gvdr](https://discourse.julialang.org/u/gvdr)
#### Post date: [December 28, 2023, 11:58pm UTC](https://discourse.julialang.org/t/i-am-building-a-simple-to-use-autoencoder-model-anyone-interested/108146/2 "2023-12-28T23:58:47Z")

</div>

Yup, that would be nice.

---

<div class="post-metadata">

### Author: ![josemanuel22](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/josemanuel22/32/20668_2.png) [@josemanuel22](https://discourse.julialang.org/u/josemanuel22)
#### Post date: [December 29, 2023, 11:18am UTC](https://discourse.julialang.org/t/i-am-building-a-simple-to-use-autoencoder-model-anyone-interested/108146/3 "2023-12-29T11:18:36Z")

</div>

would be great!

---

<div class="post-metadata">

### Author: ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)
#### Post date: [December 29, 2023, 1:19pm UTC](https://discourse.julialang.org/t/i-am-building-a-simple-to-use-autoencoder-model-anyone-interested/108146/4 "2023-12-29T13:19:57Z")

</div>

it’s done, just need to solve an issue with the autotune, release and announce it… 🙂 🙂

[https://sylvaticus.github.io/BetaML.jl/dev/Utils.html#BetaML.Utils.AutoEncoder](https://sylvaticus.github.io/BetaML.jl/dev/Utils.html#BetaML.Utils.AutoEncoder)

---

<div class="post-metadata">

### Author: ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)
#### Post date: [December 29, 2023, 3:33pm UTC](https://discourse.julialang.org/t/i-am-building-a-simple-to-use-autoencoder-model-anyone-interested/108146/5 "2023-12-29T15:33:44Z")

</div>

Done! Here the release: [[ANN] BetaML.jl.. yet an other (simple) Machine Learning Package - #13 by sylvaticus](https://discourse.julialang.org/t/ann-betaml-jl-yet-an-other-simple-machine-learning-package/41057/13)

I believe this is the easiest way to get some data have a dimensionality reduction trough an AutoEncoder. While the user can eventually specify the number of dimensions in the latent space, the number of neurons in the inner layers or the full specification of encoding/decoding layers and NN training options, this remain completely optional, as some heuristics are applied. Also the autotune method allows to further simplify these choices.

At the end the idea is that the user doesn’t need to know what there is behind the AutoEncoder, just to apply it in order to have a nonlinear transformation to a latent space of its data…
