# Machine Learning

**URL:** https://discourse.julialang.org/c/domain/ml/24.md?page=46

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

**Page:** 47

---

## [Ayush1999's Keras.jl on Julia 1.3.1 precompiling failure](https://discourse.julialang.org/t/ayush1999s-keras-jl-on-julia-1-3-1-precompiling-failure/33951)

<div class="topic-metadata">

**Author:** [@abianco](https://discourse.julialang.org/u/abianco)\
**Replies:** 10\
**Last updated:** [January 30, 2020, 3:31am UTC](https://discourse.julialang.org/t/ayush1999s-keras-jl-on-julia-1-3-1-precompiling-failure/33951 "2020-01-30T03:31:21Z")

</div>

I see that the package is a bit stale and has not been upgraded to work on Julia 1, however I was able to install it seamlessly in Julia 1.3.1 by executing Pkg.add(Pkg.PackageSpec(url="https://github.com/ayush1999/Keras.…

---

## [How to force using Tracker (not Zygote) in Flux 0.10](https://discourse.julialang.org/t/how-to-force-using-tracker-not-zygote-in-flux-0-10/33916)

<div class="topic-metadata">

**Author:** [@jaynick](https://discourse.julialang.org/u/jaynick)\
**Replies:** 1\
**Last updated:** [January 29, 2020, 2:28pm UTC](https://discourse.julialang.org/t/how-to-force-using-tracker-not-zygote-in-flux-0-10/33916 "2020-01-29T14:28:56Z")

</div>

I want to try this for debugging. In fact one of the Flux example codes does not even run under 0.10.1, error mutating arrays not supported. I tried doing using Tracker before using Flux, however it still gives the erro…

---

## [AD in a SGD loop: one call to 'gradient' or many?](https://discourse.julialang.org/t/ad-in-a-sgd-loop-one-call-to-gradient-or-many/33793)

<div class="topic-metadata">

**Author:** [@jaynick](https://discourse.julialang.org/u/jaynick)\
**Replies:** 5\
**Last updated:** [January 27, 2020, 6:09pm UTC](https://discourse.julialang.org/t/ad-in-a-sgd-loop-one-call-to-gradient-or-many/33793 "2020-01-27T18:09:21Z")

</div>

A general question about how to think about automatic differentiation. I might have thought the gradient is a function, that takes in a location and returns the up-hill vector at that location. If an AD returned such a…

---

## [Use the old Tracker interface in Flux 0.10?](https://discourse.julialang.org/t/use-the-old-tracker-interface-in-flux-0-10/33820)

<div class="topic-metadata">

**Author:** [@jaynick](https://discourse.julialang.org/u/jaynick)\
**Replies:** 3\
**Last updated:** [January 27, 2020, 6:04pm UTC](https://discourse.julialang.org/t/use-the-old-tracker-interface-in-flux-0-10/33820 "2020-01-27T18:04:57Z")

</div>

Flux 0.10 provides Zygote as the AD. Is it still possible to use Tracker in this (and near future) version of Flux? If so, wondering if it would be possible to program a unified api wrapper that would call either with …

---

## [Can't differentiate loopinfo expression when trying to compute second order derivatives using Flux and Distributions](https://discourse.julialang.org/t/cant-differentiate-loopinfo-expression-when-trying-to-compute-second-order-derivatives-using-flux-and-distributions/33818)

<div class="topic-metadata">

**Author:** [@hsm207](https://discourse.julialang.org/u/hsm207)\
**Replies:** 0\
**Last updated:** [January 26, 2020, 7:14pm UTC](https://discourse.julialang.org/t/cant-differentiate-loopinfo-expression-when-trying-to-compute-second-order-derivatives-using-flux-and-distributions/33818 "2020-01-26T19:14:34Z")

</div>

I am trying to compute the maximum a posterior (MAP) estimate and want to get the hessian of the log likelihood too. This is what I have tried with respect to computing the Hessian: using Flux, Distributions prior\_mean…

---

## [VAE in Flux model zoo](https://discourse.julialang.org/t/vae-in-flux-model-zoo/33747)

<div class="topic-metadata">

**Author:** [@rsteckel](https://discourse.julialang.org/u/rsteckel)\
**Replies:** 0\
**Last updated:** [January 24, 2020, 2:10pm UTC](https://discourse.julialang.org/t/vae-in-flux-model-zoo/33747 "2020-01-24T14:10:44Z")

</div>

I’ve been unable to get the MNIST VAE example in Flux’s model zoo to train. During epoch 1 of training, I get this error: \[ Info: Epoch 1 ERROR: Mutating arrays is not supported Stacktrace: \[1\] (::Zygote.var"#1003#100…

---

## [Loading of Flux model using BSON: Tracker not found error?](https://discourse.julialang.org/t/loading-of-flux-model-using-bson-tracker-not-found-error/33659)

<div class="topic-metadata">

**Author:** [@compleat](https://discourse.julialang.org/u/compleat)\
**Replies:** 0\
**Last updated:** [January 22, 2020, 1:12pm UTC](https://discourse.julialang.org/t/loading-of-flux-model-using-bson-tracker-not-found-error/33659 "2020-01-22T13:12:08Z")

</div>

I am having difficulty loading a BSON-saved Flux model via: BSON.@load “my\_model.jls” resulting the error ERROR: LoadError: UndefVarError: Tracker not defined even though I had explicitly loaded Tracker via using Fl…

---

## [I've written softmax() function, but I don't get the proper answer](https://discourse.julialang.org/t/ive-written-softmax-function-but-i-dont-get-the-proper-answer/33610)

<div class="topic-metadata">

**Author:** [@dialektike](https://discourse.julialang.org/u/dialektike)\
**Replies:** 2\
**Last updated:** [January 22, 2020, 4:36am UTC](https://discourse.julialang.org/t/ive-written-softmax-function-but-i-dont-get-the-proper-answer/33610 "2020-01-22T04:36:32Z")

</div>

In order to study ML, I’m making my own softmax () function. I created a softmax () function as follows: function softmax(a) c = maximum(a) exp.(a .- c) / sum(exp.(a .- c)) end The sum of the values in the outp…

---

## [How to access a layer's parameters in Flux 0.10?](https://discourse.julialang.org/t/how-to-access-a-layers-parameters-in-flux-0-10/33201)

<div class="topic-metadata">

**Author:** [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)\
**Replies:** 2\
**Last updated:** [January 13, 2020, 9:53am UTC](https://discourse.julialang.org/t/how-to-access-a-layers-parameters-in-flux-0-10/33201 "2020-01-13T09:53:20Z")

</div>

In Flux 0.10 par = params(model) returns a Zygote.Params object, which is an iterable but not indexed. How to get the parameters of the 2nd layer, for example?

---

## [Geometric DL library for Julia](https://discourse.julialang.org/t/geometric-dl-library-for-julia/22901)

<div class="topic-metadata">

**Author:** [@Azamat](https://discourse.julialang.org/u/Azamat)\
**Replies:** 5\
**Last updated:** [January 13, 2020, 6:25am UTC](https://discourse.julialang.org/t/geometric-dl-library-for-julia/22901 "2020-01-13T06:25:34Z")

</div>

I’m currently implementing geometric deep learning library. In particular, I’m extending Flux.jl to graphs and manifolds (taking advantage of the excellent LightGraphs.jl library). It’s working name is FluxGeometric.jl. …

---

## [Flux 0.10.0 does not update function definitions in Jupyter](https://discourse.julialang.org/t/flux-0-10-0-does-not-update-function-definitions-in-jupyter/33261)

<div class="topic-metadata">

**Author:** [@RM314](https://discourse.julialang.org/u/RM314)\
**Replies:** 1\
**Last updated:** [January 12, 2020, 10:39am UTC](https://discourse.julialang.org/t/flux-0-10-0-does-not-update-function-definitions-in-jupyter/33261 "2020-01-12T10:39:42Z")

</div>

I stumbled onto this behaviour recently and I’m unsure if it’s intentional, or what to do about it. If I update a function definition, invocations of gradient() seem to use the old definition even as the rest of the note…

---

## [Please help with the very simplest 4-line Autodiff example: Flux0.9](https://discourse.julialang.org/t/please-help-with-the-very-simplest-4-line-autodiff-example-flux0-9/33257)

<div class="topic-metadata">

**Author:** [@jaynick](https://discourse.julialang.org/u/jaynick)\
**Replies:** 1\
**Last updated:** [January 12, 2020, 4:33am UTC](https://discourse.julialang.org/t/please-help-with-the-very-simplest-4-line-autodiff-example-flux0-9/33257 "2020-01-12T04:33:57Z")

</div>

This is with Flux 0.9, Julia1.3 Meta comment: Julia looks amazing. I keep coming back to it, but everything I try does not seem to work. Bad beginner luck. 1a) This example I want to work. It should find \[0,0\] as the…

---

## [Best way to pass auxiliary arrays to Knet loss function](https://discourse.julialang.org/t/best-way-to-pass-auxiliary-arrays-to-knet-loss-function/33227)

<div class="topic-metadata">

**Author:** [@dfenn](https://discourse.julialang.org/u/dfenn)\
**Replies:** 0\
**Last updated:** [January 11, 2020, 1:58am UTC](https://discourse.julialang.org/t/best-way-to-pass-auxiliary-arrays-to-knet-loss-function/33227 "2020-01-11T01:58:10Z")

</div>

Julia beginner here, so I apologize if this is an obvious question. I’m implementing a model using Knet, and I’m writing a loss function that includes a penalty term that relies on information that is provided from outsi…

---

## [Custom adjoint for getindex in Zygote](https://discourse.julialang.org/t/custom-adjoint-for-getindex-in-zygote/33225)

<div class="topic-metadata">

**Author:** [@wgm](https://discourse.julialang.org/u/wgm)\
**Replies:** 0\
**Last updated:** [January 11, 2020, 1:37am UTC](https://discourse.julialang.org/t/custom-adjoint-for-getindex-in-zygote/33225 "2020-01-11T01:37:25Z")

</div>

I am new to Zygote and have a question about defining my own adjoint involving getindex with custom indexing. I’ve defined a type import Base: getindex struct ProbTensor{N} elements::Array{Float64,N} end function g…

---

## [Alarming incorrect computation in Flux / Juno?](https://discourse.julialang.org/t/alarming-incorrect-computation-in-flux-juno/33017)

<div class="topic-metadata">

**Author:** [@jaynick](https://discourse.julialang.org/u/jaynick)\
**Replies:** 6\
**Last updated:** [January 7, 2020, 6:23pm UTC](https://discourse.julialang.org/t/alarming-incorrect-computation-in-flux-juno/33017 "2020-01-07T18:23:43Z")

</div>

have a look at this bug https://github.com/FluxML/Flux.jl/issues/982 Am I correct in thinking that is is really serious error? Conv gives not repeatable, quite reandom results. I was able to repeat the bug running in…

---

## [Quantile regression in Flux v0.10](https://discourse.julialang.org/t/quantile-regression-in-flux-v0-10/32382)

<div class="topic-metadata">

**Author:** [@johnbb](https://discourse.julialang.org/u/johnbb)\
**Replies:** 10\
**Last updated:** [January 7, 2020, 12:18pm UTC](https://discourse.julialang.org/t/quantile-regression-in-flux-v0-10/32382 "2020-01-07T12:18:23Z")

</div>

I am trying various quantile regression methods using Flux, but after upgrading to Julia v1.3.0 and Flux v0.10 I am experiencing problems. For example, the following example code no longer works using Flux, Statistics, …

---

## [How to drop the dropout layers in Flux.jl when assessing model performance](https://discourse.julialang.org/t/how-to-drop-the-dropout-layers-in-flux-jl-when-assessing-model-performance/19924)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 2\
**Last updated:** [January 6, 2020, 5:59pm UTC](https://discourse.julialang.org/t/how-to-drop-the-dropout-layers-in-flux-jl-when-assessing-model-performance/19924 "2020-01-06T17:59:54Z")

</div>

I was playing around with the Flux.jl framework and I fitted a model with dropouts at every layer. using Flux, Flux.Data.MNIST, Statistics using Flux: onehotbatch, onecold, crossentropy, throttle using Base.Iterators: r…

---

## [How does GPU programming work (Knet example)?](https://discourse.julialang.org/t/how-does-gpu-programming-work-knet-example/32841)

<div class="topic-metadata">

**Author:** [@jaynick](https://discourse.julialang.org/u/jaynick)\
**Replies:** 5\
**Last updated:** [January 6, 2020, 5:37am UTC](https://discourse.julialang.org/t/how-does-gpu-programming-work-knet-example/32841 "2020-01-06T05:37:21Z")

</div>

Can anyone give a high-level summary of how julia and GPU programming work? In what cases can we write julia code and have it run on the GPU, and in what cases will it not work? I am confused. I needed to clean an imag…

---

## [Best ways to do hyper-parameter tuning](https://discourse.julialang.org/t/best-ways-to-do-hyper-parameter-tuning/33010)

<div class="topic-metadata">

**Author:** [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)\
**Replies:** 3\
**Last updated:** [January 6, 2020, 2:28am UTC](https://discourse.julialang.org/t/best-ways-to-do-hyper-parameter-tuning/33010 "2020-01-06T02:28:30Z")

</div>

I’d like to tune a model in JLBoost (an awesome, all Julia package by @xiaodai builds on XGBoost, LightGBM, & Catboost). using RDatasets, DataFrames, JLBoost, MLJ; d = dataset("MASS", "Boston"); train, test = partition…

---

## [Meta-learning in Julia](https://discourse.julialang.org/t/meta-learning-in-julia/32975)

<div class="topic-metadata">

**Author:** [@hayabu](https://discourse.julialang.org/u/hayabu)\
**Replies:** 3\
**Last updated:** [January 5, 2020, 6:57pm UTC](https://discourse.julialang.org/t/meta-learning-in-julia/32975 "2020-01-05T18:57:30Z")

</div>

Meta learning is a branch of machine learning that deals with learning to learn. An example of this is few-shot learning where the algorithm is trying to learn from a small dataset fast by given example of many datasets …

---

## [Running MNIST from model-zoo on Flux v0.10.0/Zygote/GPU](https://discourse.julialang.org/t/running-mnist-from-model-zoo-on-flux-v0-10-0-zygote-gpu/32810)

<div class="topic-metadata">

**Author:** [@tanhevg](https://discourse.julialang.org/u/tanhevg)\
**Replies:** 2\
**Last updated:** [December 30, 2019, 11:42pm UTC](https://discourse.julialang.org/t/running-mnist-from-model-zoo-on-flux-v0-10-0-zygote-gpu/32810 "2019-12-30T23:42:31Z")

</div>

Hello, I am trying to run the MNIST digit recognition from model-zoo using the latest Flux version with Zygote on a GPU. I had to make some tweaks to the code to make it run: https://github.com/tanhevg/model-zoo/blob/ta…

---

## [How to do L2 regularization with new Flux and Zygote](https://discourse.julialang.org/t/how-to-do-l2-regularization-with-new-flux-and-zygote/31756)

<div class="topic-metadata">

**Author:** [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Replies:** 2\
**Last updated:** [December 29, 2019, 3:39pm UTC](https://discourse.julialang.org/t/how-to-do-l2-regularization-with-new-flux-and-zygote/31756 "2019-12-29T15:39:31Z")

</div>

I think this MWE used to work. Now I don’t know how to compute a norm penalty because the example in Flux documentation here is still using the old Tracked stuff. using Flux m = Dense(5,1) gs = Flux.gradient(Flux.para…

---

## [Encoding categorical variables within a matrix](https://discourse.julialang.org/t/encoding-categorical-variables-within-a-matrix/32628)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 3\
**Last updated:** [December 28, 2019, 1:13am UTC](https://discourse.julialang.org/t/encoding-categorical-variables-within-a-matrix/32628 "2019-12-28T01:13:24Z")

</div>

I have a question about encoding categorical variables when constructing matrices to feed to ML models. Consider this MWE: julia\> rawdata = DataFrame(make=\["honda", "ford", "subaru"\], mpg=\[33,29,31\], price=\[30000,25000…

---

## [Different loss with Zygote when taking gradients vs. without](https://discourse.julialang.org/t/different-loss-with-zygote-when-taking-gradients-vs-without/32523)

<div class="topic-metadata">

**Author:** [@holylorenzo](https://discourse.julialang.org/u/holylorenzo)\
**Replies:** 0\
**Last updated:** [December 20, 2019, 6:13pm UTC](https://discourse.julialang.org/t/different-loss-with-zygote-when-taking-gradients-vs-without/32523 "2019-12-20T18:13:06Z")

</div>

I am working on the newest Flux branch and noticed some weird behavior. When I calculate the loss of my model’s outputs I get the following number: \> y\_pred = model(x) \> loss(y\_pred, y) 0.003791215f0 However, doing th…

---

## [Which package do you find the best for Object detection?](https://discourse.julialang.org/t/which-package-do-you-find-the-best-for-object-detection/32438)

<div class="topic-metadata">

**Author:** [@alirezamecheng](https://discourse.julialang.org/u/alirezamecheng)\
**Replies:** 1\
**Last updated:** [December 19, 2019, 1:06pm UTC](https://discourse.julialang.org/t/which-package-do-you-find-the-best-for-object-detection/32438 "2019-12-19T13:06:29Z")

</div>

Hello, I’m new to machine learning especially to the subject of Object Detection. If you don’t mind can you please share your experience with me and name a good package to start with? I’m really confused about the diffe…

---

## [The same network performs differently in Flux.jl and tensorflow](https://discourse.julialang.org/t/the-same-network-performs-differently-in-flux-jl-and-tensorflow/28378)

<div class="topic-metadata">

**Author:** [@zhangqian](https://discourse.julialang.org/u/zhangqian)\
**Replies:** 13\
**Last updated:** [December 18, 2019, 8:12am UTC](https://discourse.julialang.org/t/the-same-network-performs-differently-in-flux-jl-and-tensorflow/28378 "2019-12-18T08:12:46Z")

</div>

Hi, I am writing a toy model to test the performance of Flux.jl. I generated some dummy data with the following code import numpy as np traindata=np.random.random((10000,50)) target=np.random.random(10000) np.savetxt…

---

## [Zygote @adjoint with matrices](https://discourse.julialang.org/t/zygote-adjoint-with-matrices/32188)

<div class="topic-metadata">

**Author:** [@theogf](https://discourse.julialang.org/u/theogf)\
**Replies:** 7\
**Last updated:** [December 14, 2019, 1:41pm UTC](https://discourse.julialang.org/t/zygote-adjoint-with-matrices/32188 "2019-12-14T13:41:42Z")

</div>

Hi! I would like to use Zygote, because of the amazing possibility to tag the parameters you want to optimize and let Zygote do the rest. However in my case I am creating a matrix (K) given a (potentially highly neste…

---

## [Probabilistic shaping with flux (Telecommunication)](https://discourse.julialang.org/t/probabilistic-shaping-with-flux-telecommunication/32230)

<div class="topic-metadata">

**Author:** [@Rassibassi](https://discourse.julialang.org/u/Rassibassi)\
**Replies:** 1\
**Last updated:** [December 13, 2019, 7:21pm UTC](https://discourse.julialang.org/t/probabilistic-shaping-with-flux-telecommunication/32230 "2019-12-13T19:21:41Z")

</div>

Hi, trying to implement the following paper: \[1906.07748\] Joint Learning of Geometric and Probabilistic Constellation Shaping already got a working version in TF: https://github.com/Rassibassi/claude/blob/master/example…

---

## [Untracking a Flux Model](https://discourse.julialang.org/t/untracking-a-flux-model/24811)

<div class="topic-metadata">

**Author:** [@mboutros](https://discourse.julialang.org/u/mboutros)\
**Replies:** 10\
**Last updated:** [December 13, 2019, 4:17am UTC](https://discourse.julialang.org/t/untracking-a-flux-model/24811 "2019-12-13T04:17:18Z")

</div>

I’m using Flux to train a model and it’s working wonderfully. After the model has been trained, it’s parameters are still tracked, which means the output of calling the model is tracked. Is there a way to “untrack” each …

---

## [Is there a bug in the flux convolution code?](https://discourse.julialang.org/t/is-there-a-bug-in-the-flux-convolution-code/32169)

<div class="topic-metadata">

**Author:** [@jaynick](https://discourse.julialang.org/u/jaynick)\
**Replies:** 1\
**Last updated:** [December 12, 2019, 8:53am UTC](https://discourse.julialang.org/t/is-there-a-bug-in-the-flux-convolution-code/32169 "2019-12-12T08:53:50Z")

</div>

Apology because this is a vague question, but: is there something wrong with the convolution code in Flux? Looking at the results of this example https://github.com/avik-pal/FastStyleTransfer.jl , they just do not “loo…

[Previous page](https://discourse.julialang.org/c/domain/ml/24.md?page=45)

[Next page](https://discourse.julialang.org/c/domain/ml/24.md?page=47)
