# Machine Learning

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

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

**Page:** 51

---

## [How to use Flux for a general non-linear minimization](https://discourse.julialang.org/t/how-to-use-flux-for-a-general-non-linear-minimization/24111)

<div class="topic-metadata">

**Author:** [@misha\_mikhasenko](https://discourse.julialang.org/u/misha_mikhasenko)\
**Replies:** 1\
**Last updated:** [July 1, 2019, 9:58am UTC](https://discourse.julialang.org/t/how-to-use-flux-for-a-general-non-linear-minimization/24111 "2019-07-01T09:58:52Z")

</div>

I am trying to apply great features Flux for likelihood minimization problem. Using ML language, losses for all training data points are summed up, there is just a function LLH() to be minimized. Is there an easy hack…

---

## [Error in diffeq\_fd command of DiffEqFlux](https://discourse.julialang.org/t/error-in-diffeq-fd-command-of-diffeqflux/25837)

<div class="topic-metadata">

**Author:** [@JunichiFukui](https://discourse.julialang.org/u/JunichiFukui)\
**Replies:** 4\
**Last updated:** [June 29, 2019, 4:05pm UTC](https://discourse.julialang.org/t/error-in-diffeq-fd-command-of-diffeqflux/25837 "2019-06-29T16:05:06Z")

</div>

I’m trying to run neural partial differential equation code on the web site (Neural Jump SDEs (Jump Diffusions) and Neural PDEs - Stochastic Lifestyle). Thanks Chris for publishing the interest code. When I run the code…

---

## [Out of memory using Flux CNN during back propagation phase](https://discourse.julialang.org/t/out-of-memory-using-flux-cnn-during-back-propagation-phase/24492)

<div class="topic-metadata">

**Author:** [@Iulian.Cioarca](https://discourse.julialang.org/u/Iulian.Cioarca)\
**Replies:** 2\
**Last updated:** [June 28, 2019, 12:27pm UTC](https://discourse.julialang.org/t/out-of-memory-using-flux-cnn-during-back-propagation-phase/24492 "2019-06-28T12:27:14Z")

</div>

I want to train a CNN model on the German Traffic Sign Dataset by adapting one of the model\_zoo examples. First I tried training on a GTX1070 GPU with 8GB of RAM and failed with out of memory. After that I tried training…

---

## [Boosted trees implementation feedback](https://discourse.julialang.org/t/boosted-trees-implementation-feedback/25746)

<div class="topic-metadata">

**Author:** [@jeremiedb](https://discourse.julialang.org/u/jeremiedb)\
**Replies:** 0\
**Last updated:** [June 26, 2019, 9:00pm UTC](https://discourse.julialang.org/t/boosted-trees-implementation-feedback/25746 "2019-06-26T21:00:22Z")

</div>

I’ve taken a shot at developing a boosted trees package and would be interested in having feedback on its usability: https://github.com/Evovest/EvoTrees.jl I’m conscious there’s been some initiatives in that direciton a…

---

## [Flux RNNs leak into CuRNNs](https://discourse.julialang.org/t/flux-rnns-leak-into-curnns/25661)

<div class="topic-metadata">

**Author:** [@tanhevg](https://discourse.julialang.org/u/tanhevg)\
**Replies:** 2\
**Last updated:** [June 26, 2019, 3:27pm UTC](https://discourse.julialang.org/t/flux-rnns-leak-into-curnns/25661 "2019-06-26T15:27:57Z")

</div>

Hello, has anyone encountered Flux RNNs invoking cudnn code, although none of the models from Flux.CUDA are used? My model is built on top of Flux.LSTM (not CuLSTM), but I get the following error: ERROR: LoadError: CUD…

---

## [Very basic Flux problem](https://discourse.julialang.org/t/very-basic-flux-problem/25663)

<div class="topic-metadata">

**Author:** [@austinbean](https://discourse.julialang.org/u/austinbean)\
**Replies:** 1\
**Last updated:** [June 25, 2019, 7:23pm UTC](https://discourse.julialang.org/t/very-basic-flux-problem/25663 "2019-06-25T19:23:24Z")

</div>

I’m starting to use flux for an NN task, but I’m having trouble understanding an error message. The following is not my use case, but maybe if I understand what’s going wrong here I can fix my actual problem… using Fl…

---

## [Flux.jl is not modifying the loss](https://discourse.julialang.org/t/flux-jl-is-not-modifying-the-loss/25646)

<div class="topic-metadata">

**Author:** [@francesco.alemanno](https://discourse.julialang.org/u/francesco.alemanno)\
**Replies:** 4\
**Last updated:** [June 25, 2019, 3:05pm UTC](https://discourse.julialang.org/t/flux-jl-is-not-modifying-the-loss/25646 "2019-06-25T15:05:46Z")

</div>

using Flux,LinearAlgebra function MWE() η=0.01 model=Conv((64, 64), 1=\>1, relu,stride=30) loss(x,y) = Flux.mse(model(x),y) dataset=\[(rand(100,100,1,1),rand(2,2,1,1))\] @show model(dataset\[1\]\[1\]) @s…

---

## [Multi-headed Network on GPU with Flux](https://discourse.julialang.org/t/multi-headed-network-on-gpu-with-flux/25623)

<div class="topic-metadata">

**Author:** [@noumea](https://discourse.julialang.org/u/noumea)\
**Replies:** 0\
**Last updated:** [June 24, 2019, 7:59pm UTC](https://discourse.julialang.org/t/multi-headed-network-on-gpu-with-flux/25623 "2019-06-24T19:59:51Z")

</div>

I just started learning Flux.jl. I would like to setup a network that only takes part of the input data in the initial layer and then concatenates the output later. It looks like my code works fine on the CPU, however wh…

---

## [Autodiff on image convolution](https://discourse.julialang.org/t/autodiff-on-image-convolution/25574)

<div class="topic-metadata">

**Author:** [@francesco.alemanno](https://discourse.julialang.org/u/francesco.alemanno)\
**Replies:** 6\
**Last updated:** [June 24, 2019, 1:55pm UTC](https://discourse.julialang.org/t/autodiff-on-image-convolution/25574 "2019-06-24T13:55:15Z")

</div>

Hello everyone, i was trying to leverage julia Autodiff tools, to solve this problem: I have two images A,B and a convolution kernel K i tried to use Flux.tracker, ForwardDiff, Zygote, and Knet.AutoGrad to minimize th…

---

## [Batch Training with TensorFlow.jl](https://discourse.julialang.org/t/batch-training-with-tensorflow-jl/25575)

<div class="topic-metadata">

**Author:** [@oli](https://discourse.julialang.org/u/oli)\
**Replies:** 0\
**Last updated:** [June 23, 2019, 4:21pm UTC](https://discourse.julialang.org/t/batch-training-with-tensorflow-jl/25575 "2019-06-23T16:21:54Z")

</div>

Hi, I have an existing DNN project that works in Python, but I want to transition towards Julia. I’m having problems when it comes to using batches for training. Since my project is quite large, I will simply summarize …

---

## [Flux.jl vanilla ANN loss goes to NaN with mini batch](https://discourse.julialang.org/t/flux-jl-vanilla-ann-loss-goes-to-nan-with-mini-batch/25511)

<div class="topic-metadata">

**Author:** [@jchen975](https://discourse.julialang.org/u/jchen975)\
**Replies:** 0\
**Last updated:** [June 21, 2019, 4:14am UTC](https://discourse.julialang.org/t/flux-jl-vanilla-ann-loss-goes-to-nan-with-mini-batch/25511 "2019-06-21T04:14:00Z")

</div>

I’m building a vanilla NN with 1 or 2 hidden layers for a regression problem that’s basically as follows: I take N sets of known values (x\_1, y\_1), ..., (x\_k, y\_k) as input to an approximation solver that returns N sets…

---

## [Flux ready for a beginner deep learning project?](https://discourse.julialang.org/t/flux-ready-for-a-beginner-deep-learning-project/9262)

<div class="topic-metadata">

**Author:** [@datnamer](https://discourse.julialang.org/u/datnamer)\
**Replies:** 31\
**Last updated:** [June 20, 2019, 10:59pm UTC](https://discourse.julialang.org/t/flux-ready-for-a-beginner-deep-learning-project/9262 "2019-06-20T22:59:05Z")

</div>

Hi, I’m about to embark on a client facing Deep learning project where I’d need to get up to speed on some basic DL things and then start a research project within a couple of weeks or so. (they are aware of my curren…

---

## [How to pass the output of custom layers into Dense layer](https://discourse.julialang.org/t/how-to-pass-the-output-of-custom-layers-into-dense-layer/25421)

<div class="topic-metadata">

**Author:** [@stu](https://discourse.julialang.org/u/stu)\
**Replies:** 1\
**Last updated:** [June 19, 2019, 2:16pm UTC](https://discourse.julialang.org/t/how-to-pass-the-output-of-custom-layers-into-dense-layer/25421 "2019-06-19T14:16:03Z")

</div>

I am trying to do the following example: using Flux encoderA = Dense(10, 2) encoderB(x) = atan(x\[2\], x\[1\]) decoderA(x) = \[\[cos(x)\], \[sin(x)\]\] decoderB = Dense(2, 10) m1 = Chain(encoderA, encoderB, decoderA, decoderB) …

---

## [What datatypes can you pass into train!](https://discourse.julialang.org/t/what-datatypes-can-you-pass-into-train/25377)

<div class="topic-metadata">

**Author:** [@stu](https://discourse.julialang.org/u/stu)\
**Replies:** 3\
**Last updated:** [June 18, 2019, 7:02pm UTC](https://discourse.julialang.org/t/what-datatypes-can-you-pass-into-train/25377 "2019-06-18T19:02:10Z")

</div>

cannot find good documentation of this anywhere

---

## [Method error for maxpool(x,(2,2))](https://discourse.julialang.org/t/method-error-for-maxpool-x-2-2/24693)

<div class="topic-metadata">

**Author:** [@Don\_Burgess](https://discourse.julialang.org/u/Don_Burgess)\
**Replies:** 4\
**Last updated:** [June 18, 2019, 6:15am UTC](https://discourse.julialang.org/t/method-error-for-maxpool-x-2-2/24693 "2019-06-18T06:15:50Z")

</div>

This call from a formerly work code seems to throw a method error: x → maxpool(x, (2,2)), ERROR: MethodError: no method matching maxpool(::TrackedArray{…,Array{Float32,4}}, ::Tuple{Int64,Int64}) ======= Has the inter…

---

## [Manually updating the parameters of a Neural Network in Flux](https://discourse.julialang.org/t/manually-updating-the-parameters-of-a-neural-network-in-flux/25327)

<div class="topic-metadata">

**Author:** [@mlpeschl](https://discourse.julialang.org/u/mlpeschl)\
**Replies:** 3\
**Last updated:** [June 17, 2019, 9:32am UTC](https://discourse.julialang.org/t/manually-updating-the-parameters-of-a-neural-network-in-flux/25327 "2019-06-17T09:32:10Z")

</div>

I am currently working on a Reinforcement Learning problem, which requires to form and store (matrices) of gradients and then update the parameters of the Neural Network manually. Basically, what I have done is take the…

---

## [Flux save and load models, BSON file](https://discourse.julialang.org/t/flux-save-and-load-models-bson-file/25310)

<div class="topic-metadata">

**Author:** [@lazarusA](https://discourse.julialang.org/u/lazarusA)\
**Replies:** 2\
**Last updated:** [June 14, 2019, 8:04pm UTC](https://discourse.julialang.org/t/flux-save-and-load-models-bson-file/25310 "2019-06-14T20:04:10Z")

</div>

The question is: How to save and load more than one model into a single \*.BSON file? It’s even possible? @MikeInnes Cheers!

---

## [Circular Node Autoencoder?](https://discourse.julialang.org/t/circular-node-autoencoder/25312)

<div class="topic-metadata">

**Author:** [@stu](https://discourse.julialang.org/u/stu)\
**Replies:** 0\
**Last updated:** [June 14, 2019, 3:39pm UTC](https://discourse.julialang.org/t/circular-node-autoencoder/25312 "2019-06-14T15:39:22Z")

</div>

Does anyone have any experience using flux to create a circular node autoencoder?

---

## [Flux RNN on a GPU - unnecessary copying](https://discourse.julialang.org/t/flux-rnn-on-a-gpu-unnecessary-copying/25190)

<div class="topic-metadata">

**Author:** [@tanhevg](https://discourse.julialang.org/u/tanhevg)\
**Replies:** 0\
**Last updated:** [June 12, 2019, 12:40pm UTC](https://discourse.julialang.org/t/flux-rnn-on-a-gpu-unnecessary-copying/25190 "2019-06-12T12:40:30Z")

</div>

Hello, A question for someone who has experience writing/debugging GPU code. Consider something like this: using CuArrays, Flux lstm = LSTM(5, 3) |\> gpu data = \[rand(5) for i=1:10\] data = gpu.(data) out = lstm.(data) …

---

## [Dot overloading not supported in ScikitLearn.jl](https://discourse.julialang.org/t/dot-overloading-not-supported-in-scikitlearn-jl/25192)

<div class="topic-metadata">

**Author:** [@tosalonijain](https://discourse.julialang.org/u/tosalonijain)\
**Replies:** 1\
**Last updated:** [June 12, 2019, 2:20pm UTC](https://discourse.julialang.org/t/dot-overloading-not-supported-in-scikitlearn-jl/25192 "2019-06-12T14:20:24Z")

</div>

Hello, I am working on Julia and using ScikitLearn.jl as a package to access the ScikitLearn models of Machine Learning. As per the examples cited in the ScikitLearn.jl github repository documentation, I have used, for …

---

## [Clipping gradients with Zygote/Flux](https://discourse.julialang.org/t/clipping-gradients-with-zygote-flux/25052)

<div class="topic-metadata">

**Author:** [@mlpeschl](https://discourse.julialang.org/u/mlpeschl)\
**Replies:** 2\
**Last updated:** [June 10, 2019, 8:16pm UTC](https://discourse.julialang.org/t/clipping-gradients-with-zygote-flux/25052 "2019-06-10T20:16:32Z")

</div>

I am currently working with Flux and due to a high amount of stochasticity in my data, I often receive “Loss is NaN” and “Loss is infinite” errors during training. Reducing the stepsize of my gradient updates of course …

---

## [LSTM on a GPU](https://discourse.julialang.org/t/lstm-on-a-gpu/25113)

<div class="topic-metadata">

**Author:** [@tanhevg](https://discourse.julialang.org/u/tanhevg)\
**Replies:** 0\
**Last updated:** [June 10, 2019, 11:06am UTC](https://discourse.julialang.org/t/lstm-on-a-gpu/25113 "2019-06-10T11:06:17Z")

</div>

Hello, I am trying to run the Flux model zoo LSTM example on a GPU. Turns out there is no performance improvement; on the contrary, it gets worse. The example uses ~500mb of training data, and each epoch runs for ~25se…

---

## [Automatic differentiation - Julia implementation advantages](https://discourse.julialang.org/t/automatic-differentiation-julia-implementation-advantages/24975)

<div class="topic-metadata">

**Author:** [@lwhitefox](https://discourse.julialang.org/u/lwhitefox)\
**Replies:** 8\
**Last updated:** [June 7, 2019, 3:35pm UTC](https://discourse.julialang.org/t/automatic-differentiation-julia-implementation-advantages/24975 "2019-06-07T15:35:41Z")

</div>

I’m interested in utilizing Julia for some ML tasks; in perusing some discussions from this discourse and the Julia slack in the past, I have a vague memory of having read some claims regarding advantages of Juila implem…

---

## [OpenCV support](https://discourse.julialang.org/t/opencv-support/24828)

<div class="topic-metadata">

**Author:** [@javadba](https://discourse.julialang.org/u/javadba)\
**Replies:** 1\
**Last updated:** [June 1, 2019, 5:58am UTC](https://discourse.julialang.org/t/opencv-support/24828 "2019-06-01T05:58:57Z")

</div>

The OpenCV repo seems moribund: GitHub - maxruby/OpenCV.jl: The OpenCV (C++) interface for Julia . Is there any more recent activity in another repo or framework? Will I instead likely need to stick to python (or c++)…

---

## [Zygote load error on recent Julia version](https://discourse.julialang.org/t/zygote-load-error-on-recent-julia-version/24763)

<div class="topic-metadata">

**Author:** [@tanders](https://discourse.julialang.org/u/tanders)\
**Replies:** 2\
**Last updated:** [May 30, 2019, 12:34pm UTC](https://discourse.julialang.org/t/zygote-load-error-on-recent-julia-version/24763 "2019-05-30T12:34:11Z")

</div>

Dear all, I am trying to use Zygote on a recent Julia installation, but ran into a load error. The details are reported at the link below. https://github.com/FluxML/Zygote.jl/issues/206 I am very new still to this fie…

---

## [Approximating a Quadratic Function with Flux](https://discourse.julialang.org/t/approximating-a-quadratic-function-with-flux/24034)

<div class="topic-metadata">

**Author:** [@mboutros](https://discourse.julialang.org/u/mboutros)\
**Replies:** 6\
**Last updated:** [May 30, 2019, 8:24am UTC](https://discourse.julialang.org/t/approximating-a-quadratic-function-with-flux/24034 "2019-05-30T08:24:57Z")

</div>

I’m trying to get familiar with neural networks and Flux by estimating a series of simple models. First, I can successfully estimate a linear model using Flux: using Plots using Flux using Flux: @epochs gridsize = 100;…

---

## [Lifting a Julia function into a Flux "layer"](https://discourse.julialang.org/t/lifting-a-julia-function-into-a-flux-layer/13712)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 7\
**Last updated:** [May 29, 2019, 4:11pm UTC](https://discourse.julialang.org/t/lifting-a-julia-function-into-a-flux-layer/13712 "2019-05-29T16:11:11Z")

</div>

Flux confused me for a long time. I got the first example in the docs to work: using Flux.Tracker W = param(rand(2, 5)) b = param(rand(2)) predict(x) = W\*x .+ b loss(x, y) = sum((predict(x) .- y).^2) x, y = rand(5), …

---

## [DiffEqFlux / diffeq\_adjoint: no method matching back!(::Float64)](https://discourse.julialang.org/t/diffeqflux-diffeq-adjoint-no-method-matching-back-float64/24648)

<div class="topic-metadata">

**Author:** [@mihai](https://discourse.julialang.org/u/mihai)\
**Replies:** 3\
**Last updated:** [May 28, 2019, 1:36pm UTC](https://discourse.julialang.org/t/diffeqflux-diffeq-adjoint-no-method-matching-back-float64/24648 "2019-05-28T13:36:18Z")

</div>

Hi all, I’m new to julia and ML, so maybe it’s something obvious, but I’m a bit lost now. I would like to optimize a large set of parameters (N ODE’s with N \> 2k) to fit to data. From reading the documentation of DiffEq…

---

## [Flux support for sparse CuArrays](https://discourse.julialang.org/t/flux-support-for-sparse-cuarrays/24387)

<div class="topic-metadata">

**Author:** [@rayegun](https://discourse.julialang.org/u/rayegun)\
**Replies:** 0\
**Last updated:** [May 19, 2019, 9:03pm UTC](https://discourse.julialang.org/t/flux-support-for-sparse-cuarrays/24387 "2019-05-19T21:03:38Z")

</div>

Hey. I opened an issue on GitHub in the CuArrays repo but this may be a better avenue. Does Flux support (fully/partially) the sparse arrays implemented in that repo? Are there any hidden errors/issues I should be aware…

---

## [Flux & Julia v. 1.1.1](https://discourse.julialang.org/t/flux-julia-v-1-1-1/24317)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 2\
**Last updated:** [May 17, 2019, 3:59pm UTC](https://discourse.julialang.org/t/flux-julia-v-1-1-1/24317 "2019-05-17T15:59:20Z")

</div>

I just upgraded Julia to v. 1.1.1, and have updated packages. When I run using Flux, I get error messages. The status of Flux is: (v1.1) pkg\> status Flux Status \`C:\\Users\\my\_username\\.julia\\environments\\v1.1\\Projec…

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

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